wx.PenInfo¶This class is a helper used for wx.Pen creation using named parameter idiom: it allows specifying various wx.Pen attributes using the chained calls to its clearly named methods instead of passing them in the fixed order to wx.Pen constructors.
For instance, to create a dotted blue pen with the given join style you could do
pen = wx.Pen(wx.PenInfo(wx.BLUE).Style(wx.PENSTYLE_DOT).Join(wx.JOIN_BEVEL))
Added in version 4.1/wxWidgets-3.1.1.
Class Hierarchy¶
Inheritance diagram for class PenInfo:
Methods Summary¶Constructor, which can set the colour, width and style for the pen. |
|
Sets the cap (i.e., the end point) for the pen. |
|
Sets the colour for the pen. |
|
Returns the pen’s cap (i.e., end-point style). |
|
Returns the pen’s colour. |
|
Returns the pen’s joining method. |
|
Returns the pen’s quality. |
|
Returns the pen’s stipple bitmap. |
|
Returns the pen’s style. |
|
Returns the pen’s line width. |
|
Set high pen quality. |
|
Returns whether the pen is transparent. |
|
Sets the join for the pen, which is the appearance of where two lines meet or overlap. |
|
Set low pen quality. |
|
Set the pen quality. |
|
Sets the bitmap used for stippling. |
|
Sets the style for the pen. |
|
Sets the line width for the pen. |
Class API¶Possible constructors:
PenInfo(colour=Colour(), width=1, style=PENSTYLE_SOLID) -> None
This class is a helper used for Pen creation using named parameter idiom: it allows specifying various Pen attributes using the chained calls to its clearly named methods instead of passing them in the fixed order to Pen constructors.
Constructor, which can set the colour, width and style for the pen.
Sets the cap (i.e., the end point) for the pen.
cap (PenCap)
Returns the pen’s joining method.
Returns the pen’s quality.
Returns the pen’s style.
Returns the pen’s line width.
int
Set high pen quality.
This is the same as calling Quality with PEN_QUALITY_HIGH.
Added in version 4.1/wxWidgets-3.1.5.
Returns whether the pen is transparent.
bool
Sets the join for the pen, which is the appearance of where two lines meet or overlap.
join (PenJoin)
Set low pen quality.
This is the same as calling Quality with PEN_QUALITY_LOW.
Added in version 4.1/wxWidgets-3.1.5.
Set the pen quality.
Using LowQuality or HighQuality is usually more convenient.
quality (PenQuality)
Added in version 4.1/wxWidgets-3.1.5.
See also
Sets the bitmap used for stippling.
When the pen is used, a repeating pattern of this bitmap will be drawn.
stipple (wx.Bitmap)
Sets the line width for the pen.
width (int)