This class is a helper used for wx.GraphicsPen creation using named parameter idiom: it allows specifying various wx.GraphicsPen attributes using the chained calls to its clearly named methods instead of passing them in the fixed order to wx.GraphicsPen constructors.
Typically you would use wx.GraphicsPenInfo with a wx.GraphicsContext, e.g. to start drawing with a dotted blue pen slightly wider than normal you could write the following:
ctx = wx.GraphicsContext.Create(dc)
pen = ctx.CreatePen(wx.GraphicsPenInfo(wx.BLUE).Width(1.25).Style(wx.PENSTYLE_DOT))
ctx.SetPen(pen)
New in version 4.1/wxWidgets-3.1.1.
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
wx.
GraphicsPenInfo
(object)¶Possible constructors:
GraphicsPenInfo(colour: Colour=Colour(), width: float=1.0, style:
PenStyle=PENSTYLE_SOLID) -> None
This class is a helper used for GraphicsPen creation using named parameter idiom: it allows specifying various GraphicsPen attributes using the chained calls to its clearly named methods instead of passing them in the fixed order to GraphicsPen constructors.
__init__
(self, colour: Colour=Colour(), width: float=1.0, style: PenStyle=PENSTYLE_SOLID)¶GetEndX
(self)¶float
GetEndY
(self)¶float
GetGradientType
(self)¶GetJoin
(self)¶GetRadius
(self)¶float
GetStartX
(self)¶float
GetStartY
(self)¶float
GetStops
(self)¶GetStyle
(self)¶GetWidth
(self)¶float
GetX1
(self)¶float
GetX2
(self)¶float
GetY1
(self)¶float
GetY2
(self)¶float
IsTransparent
(self)¶bool
LinearGradient
(self, *args, **kw)¶LinearGradient (self, x1 : float, y1 : float, x2 : float, y2 : float, c1 : Colour, c2 : Colour, matrix: GraphicsMatrix=NullGraphicsMatrix)
x1 (wx.Double) –
y1 (wx.Double) –
x2 (wx.Double) –
y2 (wx.Double) –
c1 (wx.Colour) –
c2 (wx.Colour) –
matrix (wx.GraphicsMatrix) –
LinearGradient (self, x1 : float, y1 : float, x2 : float, y2 : float, stops : GraphicsGradientStops, matrix: GraphicsMatrix=NullGraphicsMatrix)
x1 (wx.Double) –
y1 (wx.Double) –
x2 (wx.Double) –
y2 (wx.Double) –
stops (wx.GraphicsGradientStops) –
matrix (wx.GraphicsMatrix) –
RadialGradient
(self, *args, **kw)¶RadialGradient (self, startX : float, startY : float, endX : float, endY : float, radius : float, oColor : Colour, cColor : Colour, matrix: GraphicsMatrix=NullGraphicsMatrix)
startX (wx.Double) –
startY (wx.Double) –
endX (wx.Double) –
endY (wx.Double) –
radius (wx.Double) –
oColor (wx.Colour) –
cColor (wx.Colour) –
matrix (wx.GraphicsMatrix) –
RadialGradient (self, startX : float, startY : float, endX : float, endY : float, radius : float, stops : GraphicsGradientStops, matrix: GraphicsMatrix=NullGraphicsMatrix)
startX (wx.Double) –
startY (wx.Double) –
endX (wx.Double) –
endY (wx.Double) –
radius (wx.Double) –
stops (wx.GraphicsGradientStops) –
matrix (wx.GraphicsMatrix) –
Width
(self, width : float)¶width (wx.Double) –
GradientType
¶See GetGradientType