#include <wx/pen.h>
This class is a helper used for wxPen creation using named parameter idiom: it allows specifying various wxPen attributes using the chained calls to its clearly named methods instead of passing them in the fixed order to wxPen constructors.
For instance, to create a dotted blue pen with the given join style you could do
Public Member Functions | |
wxPenInfo (const wxColour &colour=wxColour(), int width=1, wxPenStyle style=wxPENSTYLE_SOLID) | |
Constructor, which can set the colour, width and style for the pen. More... | |
wxPenInfo & | Colour (const wxColour &col) |
Sets the colour for the pen. More... | |
wxPenInfo & | Width (int width) |
Sets the line width for the pen. More... | |
wxPenInfo & | Style (wxPenStyle style) |
Sets the style for the pen. More... | |
wxPenInfo & | Stipple (const wxBitmap &stipple) |
Sets the bitmap used for stippling. More... | |
wxPenInfo & | Dashes (int nb_dashes, const wxDash *dash) |
Sets the dash pattern used to draw the pen's line. More... | |
wxPenInfo & | Join (wxPenJoin join) |
Sets the join for the pen, which is the appearance of where two lines meet or overlap. More... | |
wxPenInfo & | Cap (wxPenCap cap) |
Sets the cap (i.e., the end point) for the pen. More... | |
wxPenInfo & | Quality (wxPenQuality quality) |
Set the pen quality. More... | |
wxPenInfo & | LowQuality () |
Set low pen quality. More... | |
wxPenInfo & | HighQuality () |
Set high pen quality. More... | |
wxColour | GetColour () const |
Returns the pen's colour. More... | |
wxBitmap | GetStipple () const |
Returns the pen's stipple bitmap. More... | |
wxPenStyle | GetStyle () const |
Returns the pen's style. More... | |
wxPenJoin | GetJoin () const |
Returns the pen's joining method. More... | |
wxPenCap | GetCap () const |
Returns the pen's cap (i.e., end-point style). More... | |
wxPenQuality | GetQuality () const |
Returns the pen's quality. More... | |
int | GetDashes (wxDash **ptr) |
Returns the pen's dash pattern and number of dashes in the pattern. More... | |
int | GetDashCount () const |
Returns the number of dashes in the pen's dash pattern. More... | |
wxDash * | GetDash () const |
Returns the pen's dash pattern. More... | |
bool | IsTransparent () const |
Returns whether the pen is transparent. More... | |
int | GetWidth () const |
Returns the pen's line width. More... | |
|
explicit |
Constructor, which can set the colour, width and style for the pen.
wxPenInfo& wxPenInfo::Dashes | ( | int | nb_dashes, |
const wxDash * | dash | ||
) |
Sets the dash pattern used to draw the pen's line.
wxPenCap wxPenInfo::GetCap | ( | ) | const |
Returns the pen's cap (i.e., end-point style).
wxColour wxPenInfo::GetColour | ( | ) | const |
Returns the pen's colour.
wxDash* wxPenInfo::GetDash | ( | ) | const |
Returns the pen's dash pattern.
int wxPenInfo::GetDashCount | ( | ) | const |
Returns the number of dashes in the pen's dash pattern.
int wxPenInfo::GetDashes | ( | wxDash ** | ptr | ) |
Returns the pen's dash pattern and number of dashes in the pattern.
wxPenJoin wxPenInfo::GetJoin | ( | ) | const |
Returns the pen's joining method.
wxPenQuality wxPenInfo::GetQuality | ( | ) | const |
Returns the pen's quality.
wxBitmap wxPenInfo::GetStipple | ( | ) | const |
Returns the pen's stipple bitmap.
wxPenStyle wxPenInfo::GetStyle | ( | ) | const |
Returns the pen's style.
int wxPenInfo::GetWidth | ( | ) | const |
Returns the pen's line width.
wxPenInfo& wxPenInfo::HighQuality | ( | ) |
bool wxPenInfo::IsTransparent | ( | ) | const |
Returns whether the pen is transparent.
Sets the join for the pen, which is the appearance of where two lines meet or overlap.
wxPenInfo& wxPenInfo::LowQuality | ( | ) |
wxPenInfo& wxPenInfo::Quality | ( | wxPenQuality | quality | ) |
Set the pen quality.
Using LowQuality() or HighQuality() is usually more convenient.
Sets the bitmap used for stippling.
When the pen is used, a repeating pattern of this bitmap will be drawn.
wxPenInfo& wxPenInfo::Style | ( | wxPenStyle | style | ) |
Sets the style for the pen.
wxPenInfo& wxPenInfo::Width | ( | int | width | ) |
Sets the line width for the pen.