Don't mention wxPenInfoBase in the documentation
This is an implementation detail, don't confuse the user with this template class which isn't supposed to be used in the user code. Also improve the example in the documentation, the old one (using pen of width 0 but with a colour) didn't make much sense.
This commit is contained in:
parent
a156d5fa40
commit
af3581758b
@ -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<wxGraphicsPenInfo>
|
||||
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);
|
||||
|
||||
|
@ -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<wxPenInfo>
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user