OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
RoundedRectangle Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/Widgets/RoundedRectangle.hpp>

Inheritance diagram for RoundedRectangle:
Collaboration diagram for RoundedRectangle:

Public Member Functions

 RoundedRectangle (wxWindow *parent, wxColour col, wxPoint pos, wxSize size, double radius, int type=0)
 ~RoundedRectangle ()
void OnPaint (wxPaintEvent &evt)

Private Attributes

double m_radius
int m_type
wxColour m_color

Detailed Description

Constructor & Destructor Documentation

◆ RoundedRectangle()

RoundedRectangle::RoundedRectangle ( wxWindow * parent,
wxColour col,
wxPoint pos,
wxSize size,
double radius,
int type = 0 )
16 : wxWindow(parent, wxID_ANY, pos, size, wxBORDER_NONE)
17{
18 SetBackgroundColour(wxColour(255,255,255));
19 m_type = type;
20 m_color = col;
21 m_radius = radius;
22}
int m_type
Definition RoundedRectangle.hpp:17
double m_radius
Definition RoundedRectangle.hpp:16
wxColour m_color
Definition RoundedRectangle.hpp:18

References RoundedRectangle(), m_color, m_radius, and m_type.

Referenced by RoundedRectangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~RoundedRectangle()

RoundedRectangle::~RoundedRectangle ( )
inline
13{};

Member Function Documentation

◆ OnPaint()

void RoundedRectangle::OnPaint ( wxPaintEvent & evt)
25{
26 //draw RoundedRectangle
27 if (m_type == 0) {
28 wxPaintDC dc(this);
29 dc.SetPen(*wxTRANSPARENT_PEN);
30 dc.SetBrush(wxBrush(m_color));
31 dc.DrawRoundedRectangle(0, 0, GetSize().GetWidth(), GetSize().GetHeight(), m_radius);
32 }
33
34 //draw RoundedRectangle only board
35 if (m_type == 1) {
36 wxPaintDC dc(this);
37 dc.SetPen(m_color);
38 dc.SetBrush(wxBrush(*wxTRANSPARENT_BRUSH));
39 dc.DrawRoundedRectangle(0, 0, GetSize().GetWidth(), GetSize().GetHeight(), m_radius);
40 }
41}

References m_color, m_radius, and m_type.

Member Data Documentation

◆ m_color

wxColour RoundedRectangle::m_color
private

Referenced by RoundedRectangle(), and OnPaint().

◆ m_radius

double RoundedRectangle::m_radius
private

Referenced by RoundedRectangle(), and OnPaint().

◆ m_type

int RoundedRectangle::m_type
private

Referenced by RoundedRectangle(), and OnPaint().


The documentation for this class was generated from the following files: