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(), width=1.0, style=PENSTYLE_SOLID)
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(), width=1.0, style=PENSTYLE_SOLID)¶GetEndX
(self)¶wx.Double
GetEndY
(self)¶wx.Double
GetGradientType
(self)¶GetJoin
(self)¶GetRadius
(self)¶wx.Double
GetStartX
(self)¶wx.Double
GetStartY
(self)¶wx.Double
GetStops
(self)¶GetStyle
(self)¶GetWidth
(self)¶wx.Double
GetX1
(self)¶wx.Double
GetX2
(self)¶wx.Double
GetY1
(self)¶wx.Double
GetY2
(self)¶wx.Double
IsTransparent
(self)¶bool
LinearGradient
(self, *args, **kw)¶LinearGradient (self, x1, y1, x2, y2, c1, c2, matrix=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, y1, x2, y2, stops, matrix=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, startY, endX, endY, radius, oColor, cColor, matrix=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, startY, endX, endY, radius, stops, matrix=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)¶width (wx.Double) –
GradientType
¶See GetGradientType