ENH: refine physical printer dialog

Change-Id: I34d122f83addab3db2952a6a2b91b59921d2a981
This commit is contained in:
tao.jin authored and Lane.Wei committed 2023-01-10 19:08:26 +08:00
1 parent f89dfa7615
commit b6ef31f7b9
4 files changed
+104 -45

No files matched your search

+6 -5
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);
}
}