Skip to content

Commit 79a72dc

Browse files
committed
fix wx31 warnings - deprecated styles
* use wxFontFamily, wxFontStyle, wxFontWeight, wxBrushStyle, wxPenStyle, wxPenCap, wxPenJoin enum values instead * https://github.com/wxWidgets/wxWidgets/blob/v3.1.0/include/wx/defs.h#L2438-L2440
1 parent ac2c367 commit 79a72dc

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/plotctrl.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ void wxPlotCtrl::DrawActiveBitmap( wxDC* dc )
654654
int top = m_yAxisScrollbar->GetRect().GetBottom();
655655
wxRect rect(left, top, size.x - left, size.y - top);
656656
// clear background
657-
dc->SetBrush(wxBrush(GetBackgroundColour(), wxSOLID));
657+
dc->SetBrush(wxBrush(GetBackgroundColour(), wxBRUSHSTYLE_SOLID));
658658
dc->SetPen(*wxTRANSPARENT_PEN);
659659
dc->DrawRectangle(rect);
660660
// center the bitmap
@@ -2525,8 +2525,8 @@ void wxPlotCtrl::DrawAreaWindow( wxDC *dc, const wxRect &rect )
25252525

25262526
dc->SetClippingRegion(refreshRect);
25272527

2528-
dc->SetBrush( wxBrush(GetBackgroundColour(), wxSOLID) );
2529-
dc->SetPen( wxPen(GetBorderColour(), m_area_border_width, wxSOLID) );
2528+
dc->SetBrush( wxBrush(GetBackgroundColour(), wxBRUSHSTYLE_SOLID) );
2529+
dc->SetPen( wxPen(GetBorderColour(), m_area_border_width, wxPENSTYLE_SOLID) );
25302530
dc->DrawRectangle(clientRect);
25312531

25322532
DrawTickMarks( dc, refreshRect );
@@ -2563,7 +2563,7 @@ void wxPlotCtrl::DrawAreaWindow( wxDC *dc, const wxRect &rect )
25632563

25642564
// refresh border
25652565
dc->SetBrush( *wxTRANSPARENT_BRUSH );
2566-
dc->SetPen( wxPen(GetBorderColour(), m_area_border_width, wxSOLID) );
2566+
dc->SetPen( wxPen(GetBorderColour(), m_area_border_width, wxPENSTYLE_SOLID) );
25672567
dc->DrawRectangle(clientRect);
25682568

25692569
dc->SetPen( wxNullPen );
@@ -2584,7 +2584,7 @@ void wxPlotCtrl::DrawMouseMarker( wxDC *dc, int type, const wxRect &rect )
25842584
#endif
25852585
dc->SetLogicalFunction( wxINVERT );
25862586
dc->SetBrush( *wxTRANSPARENT_BRUSH );
2587-
dc->SetPen(*wxThePenList->FindOrCreatePen(*wxBLACK, 1, wxDOT));
2587+
dc->SetPen(*wxThePenList->FindOrCreatePen(*wxBLACK, 1, wxPENSTYLE_DOT));
25882588

25892589
switch (type)
25902590
{
@@ -2765,7 +2765,7 @@ void wxPlotCtrl::DrawCurveCursor( wxDC *dc )
27652765
void wxPlotCtrl::DrawTickMarks( wxDC *dc, const wxRect& rect )
27662766
{
27672767
wxRect clientRect(GetPlotAreaRect());
2768-
dc->SetPen( wxPen(GetGridColour(), 1, wxSOLID) );
2768+
dc->SetPen( wxPen(GetGridColour(), 1, wxPENSTYLE_SOLID) );
27692769

27702770
int xtick_length = GetDrawGrid() ? clientRect.height : 10;
27712771
int ytick_length = GetDrawGrid() ? clientRect.width : 10;

src/plotcurv.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ void InitPlotCurveDefaultPens()
107107
if (!s_init_default_pens)
108108
{
109109
s_init_default_pens = true;
110-
wxPlotCurveRefData::sm_defaultPens.Add(wxGenericPen( wxGenericColour( 0, 0, 0), 1, wxSOLID ));
111-
wxPlotCurveRefData::sm_defaultPens.Add(wxGenericPen( wxGenericColour( 0, 0, 255), 1, wxSOLID ));
112-
wxPlotCurveRefData::sm_defaultPens.Add(wxGenericPen( wxGenericColour(255, 0, 0), 1, wxSOLID ));
110+
wxPlotCurveRefData::sm_defaultPens.Add(wxGenericPen( wxGenericColour( 0, 0, 0), 1, wxPENSTYLE_SOLID ));
111+
wxPlotCurveRefData::sm_defaultPens.Add(wxGenericPen( wxGenericColour( 0, 0, 255), 1, wxPENSTYLE_SOLID ));
112+
wxPlotCurveRefData::sm_defaultPens.Add(wxGenericPen( wxGenericColour(255, 0, 0), 1, wxPENSTYLE_SOLID ));
113113
}
114114
}
115115

src/plotdraw.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,8 @@ wxPlotDrawerAxisBase::wxPlotDrawerAxisBase(wxPlotCtrl* owner)
509509
m_tickColour = wxGenericColour(0,0,0);
510510
m_labelColour = wxGenericColour(0,0,0);
511511

512-
m_tickPen = wxGenericPen(m_tickColour, wxSOLID);
513-
m_backgroundBrush = wxGenericBrush(wxGenericColour(255,255,255), wxSOLID);
512+
m_tickPen = wxGenericPen(m_tickColour, wxPENSTYLE_SOLID);
513+
m_backgroundBrush = wxGenericBrush(wxGenericColour(255,255,255), wxBRUSHSTYLE_SOLID);
514514
}
515515

516516
//-----------------------------------------------------------------------------

0 commit comments

Comments
 (0)