phoenix_title 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 Class Hierarchy

Inheritance diagram for class PenInfo:

method_summary Methods Summary

__init__

Constructor, which can set the colour, width and style for the pen.

Cap

Sets the cap (i.e., the end point) for the pen.

Colour

Sets the colour for the pen.

GetCap

Returns the pen’s cap (i.e., end-point style).

GetColour

Returns the pen’s colour.

GetJoin

Returns the pen’s joining method.

GetQuality

Returns the pen’s quality.

GetStipple

Returns the pen’s stipple bitmap.

GetStyle

Returns the pen’s style.

GetWidth

Returns the pen’s line width.

HighQuality

Set high pen quality.

IsTransparent

Returns whether the pen is transparent.

Join

Sets the join for the pen, which is the appearance of where two lines meet or overlap.

LowQuality

Set low pen quality.

Quality

Set the pen quality.

Stipple

Sets the bitmap used for stippling.

Style

Sets the style for the pen.

Width

Sets the line width for the pen.


api Class API

class wx.PenInfo(object)

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.


Methods

__init__(self, colour=Colour(), width=1, style=PENSTYLE_SOLID)

Constructor, which can set the colour, width and style for the pen.

Parameters:
Return type:

None



Cap(self, cap)

Sets the cap (i.e., the end point) for the pen.

Parameters:

cap (PenCap)

Return type:

wx.PenInfo



Colour(self, col)

Sets the colour for the pen.

Parameters:

col (wx.Colour)

Return type:

wx.PenInfo



GetCap(self)

Returns the pen’s cap (i.e., end-point style).

Return type:

wx.PenCap



GetColour(self)

Returns the pen’s colour.

Return type:

wx.Colour



GetJoin(self)

Returns the pen’s joining method.

Return type:

wx.PenJoin



GetQuality(self)

Returns the pen’s quality.

Return type:

wx.PenQuality



GetStipple(self)

Returns the pen’s stipple bitmap.

Return type:

wx.Bitmap



GetStyle(self)

Returns the pen’s style.

Return type:

wx.PenStyle



GetWidth(self)

Returns the pen’s line width.

Return type:

int



HighQuality(self)

Set high pen quality.

This is the same as calling Quality with PEN_QUALITY_HIGH.

Return type:

wx.PenInfo

Added in version 4.1/wxWidgets-3.1.5.



IsTransparent(self)

Returns whether the pen is transparent.

Return type:

bool



Join(self, join)

Sets the join for the pen, which is the appearance of where two lines meet or overlap.

Parameters:

join (PenJoin)

Return type:

wx.PenInfo



LowQuality(self)

Set low pen quality.

This is the same as calling Quality with PEN_QUALITY_LOW.

Return type:

wx.PenInfo

Added in version 4.1/wxWidgets-3.1.5.



Quality(self, quality)

Set the pen quality.

Using LowQuality or HighQuality is usually more convenient.

Parameters:

quality (PenQuality)

Return type:

wx.PenInfo

Added in version 4.1/wxWidgets-3.1.5.



Stipple(self, stipple)

Sets the bitmap used for stippling.

When the pen is used, a repeating pattern of this bitmap will be drawn.

Parameters:

stipple (wx.Bitmap)

Return type:

wx.PenInfo



Style(self, style)

Sets the style for the pen.

Parameters:

style (PenStyle)

Return type:

wx.PenInfo



Width(self, width)

Sets the line width for the pen.

Parameters:

width (int)

Return type:

wx.PenInfo