diff --git a/interface/wx/graphics.h b/interface/wx/graphics.h index fdc263c4ac..cec978d8e4 100644 --- a/interface/wx/graphics.h +++ b/interface/wx/graphics.h @@ -1541,22 +1541,23 @@ public: calls to its clearly named methods instead of passing them in the fixed order to wxGraphicsPen constructors. - Typically you would use wxGraphicsPenInfo with a wxGraphicsContext: + Typically you would use wxGraphicsPenInfo with a wxGraphicsContext, e.g. to + start drawing with a dotted blue pen slightly wider than normal you could + write the following: @code wxGraphicsContext ctx = wxGraphicsContext::Create(dc); - ctx.SetPen(wxGraphicsPenInfo(*wxBLUE, 1.25)); + ctx.SetPen(wxGraphicsPenInfo(*wxBLUE).Width(1.25).Style(wxPENSTYLE_DOT)); @endcode @since 3.1.1 */ -class wxGraphicsPenInfo : public wxPenInfoBase +class wxGraphicsPenInfo { public: - - explicit wxGraphicsPenInfo(const wxColour& colour = wxColour(), wxDouble width = 1.0, wxPenStyle style = wxPENSTYLE_SOLID); - - static wxGraphicsPenInfo CreateFromPen(const wxPen& pen); + explicit wxGraphicsPenInfo(const wxColour& colour = wxColour(), + wxDouble width = 1.0, + wxPenStyle style = wxPENSTYLE_SOLID); wxGraphicsPenInfo& Colour(const wxColour& col); diff --git a/interface/wx/pen.h b/interface/wx/pen.h index a9ecddb59c..04000e478f 100644 --- a/interface/wx/pen.h +++ b/interface/wx/pen.h @@ -109,18 +109,20 @@ enum wxPenCap calls to its clearly named methods instead of passing them in the fixed order to wxPen constructors. - For instance, to create a blue pen with a width of 0: + For instance, to create a dotted blue pen with the given join style you + could do @code - wxPen pen(wxPenInfo(*wxBLUE, 0)); + wxPen pen(wxPenInfo(*wxBLUE).Style(wxPENSTYLE_DOT).Join(wxJOIN_BEVEL)); @endcode @since 3.1.1 */ -class wxPenInfo : public wxPenInfoBase +class wxPenInfo { public: - - explicit wxPenInfo(const wxColour& colour = wxColour(), int width = 1, wxPenStyle style = wxPENSTYLE_SOLID); + explicit wxPenInfo(const wxColour& colour = wxColour(), + int width = 1, + wxPenStyle style = wxPENSTYLE_SOLID); wxPenInfo& Colour(const wxColour& col);