ENH: refine physical printer dialog

Change-Id: I34d122f83addab3db2952a6a2b91b59921d2a981
This commit is contained in:
tao.jin 2022-12-20 13:13:48 +08:00 committed by Lane.Wei
parent f89dfa7615
commit b6ef31f7b9
4 changed files with 104 additions and 45 deletions

View file

@ -6,9 +6,9 @@ BEGIN_EVENT_TABLE(RoundedRectangle, wxPanel)
EVT_PAINT(RoundedRectangle::OnPaint)
END_EVENT_TABLE()
RoundedRectangle::RoundedRectangle(wxWindow *parent, wxColour col, wxPoint pos, wxSize size, double radius, int type)
: wxWindow(parent, wxID_ANY, pos, size, wxBORDER_NONE)
{
RoundedRectangle::RoundedRectangle(wxWindow *parent, wxColour col, wxPoint pos, wxSize size, double radius, int type)
: wxWindow(parent, wxID_ANY, pos, size, wxBORDER_NONE)
{
SetBackgroundColour(wxColour(255,255,255));
m_type = type;
m_color = col;
@ -26,9 +26,10 @@ void RoundedRectangle::OnPaint(wxPaintEvent &evt)
}
//draw RoundedRectangle only board
if (m_type == 1) {
if (m_type == 1) {
wxPaintDC dc(this);
dc.SetPen(m_color);
dc.SetPen(m_color);
dc.SetBrush(wxBrush(*wxTRANSPARENT_BRUSH));
dc.DrawRoundedRectangle(0, 0, GetSize().GetWidth(), GetSize().GetHeight(), m_radius);
}
}