wx.GraphicsPenInfo¶
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)
Added in version 4.1/wxWidgets-3.1.1.
Class Hierarchy¶
Methods Summary¶
Properties Summary¶
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
Class API¶
- class wx.GraphicsPenInfo(object)¶
Possible constructors:
GraphicsPenInfo(colour=Colour(), width=1.0, style=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.
Methods¶
- __init__(self, colour=Colour(), width=1.0, style=PENSTYLE_SOLID)¶
- GetEndX(self)¶
- Return type:
float
- GetEndY(self)¶
- Return type:
float
- GetGradientType(self)¶
- Return type:
- GetJoin(self)¶
- Return type:
- GetRadius(self)¶
- Return type:
float
- GetStartX(self)¶
- Return type:
float
- GetStartY(self)¶
- Return type:
float
- GetStops(self)¶
- Return type:
- GetStyle(self)¶
- Return type:
- GetWidth(self)¶
- Return type:
float
- GetX1(self)¶
- Return type:
float
- GetX2(self)¶
- Return type:
float
- GetY1(self)¶
- Return type:
float
- GetY2(self)¶
- Return type:
float
- IsTransparent(self)¶
- Return type:
bool
- LinearGradient(self, *args, **kw)¶
-
LinearGradient (self, x1, y1, x2, y2, c1, c2, matrix=NullGraphicsMatrix)
- Parameters:
x1 (wx.Double)
y1 (wx.Double)
x2 (wx.Double)
y2 (wx.Double)
c1 (wx.Colour)
c2 (wx.Colour)
matrix (wx.GraphicsMatrix)
- Return type:
LinearGradient (self, x1, y1, x2, y2, stops, matrix=NullGraphicsMatrix)
- Parameters:
x1 (wx.Double)
y1 (wx.Double)
x2 (wx.Double)
y2 (wx.Double)
stops (wx.GraphicsGradientStops)
matrix (wx.GraphicsMatrix)
- Return type:
- RadialGradient(self, *args, **kw)¶
-
RadialGradient (self, startX, startY, endX, endY, radius, oColor, cColor, matrix=NullGraphicsMatrix)
- Parameters:
startX (wx.Double)
startY (wx.Double)
endX (wx.Double)
endY (wx.Double)
radius (wx.Double)
oColor (wx.Colour)
cColor (wx.Colour)
matrix (wx.GraphicsMatrix)
- Return type:
RadialGradient (self, startX, startY, endX, endY, radius, stops, matrix=NullGraphicsMatrix)
- Parameters:
startX (wx.Double)
startY (wx.Double)
endX (wx.Double)
endY (wx.Double)
radius (wx.Double)
stops (wx.GraphicsGradientStops)
matrix (wx.GraphicsMatrix)
- Return type:
- Width(self, width)¶
- Parameters:
width (wx.Double)
- Return type:
Properties¶
- GradientType¶
See
GetGradientType