wx.GraphicsGradientStop¶
Represents a single gradient stop in a collection of gradient stops as represented by wx.GraphicsGradientStops.
Added in version 2.9.1.
Class Hierarchy¶
Methods Summary¶
Creates a stop with the given colour and position. |
|
Return the stop colour. |
|
Return the stop position. |
|
Change the stop colour. |
|
Change the stop position. |
Properties Summary¶
See |
Class API¶
- class wx.GraphicsGradientStop(object)¶
Possible constructors:
GraphicsGradientStop(col=TransparentColour, pos=0.) -> None
Represents a single gradient stop in a collection of gradient stops as represented by GraphicsGradientStops.
Methods¶
- __init__(self, col=TransparentColour, pos=0.)¶
Creates a stop with the given colour and position.
- Parameters:
col (wx.Colour) – The colour of this stop. Note that the alpha component of the colour is honoured thus allowing the background colours to partially show through the gradient.
pos (float) – The stop position, must be in
[0
,1]
range with 0 being the beginning and 1 the end of the gradient.
- Return type:
None
- GetPosition(self)¶
Return the stop position.
- Return type:
float
- SetColour(self, col)¶
Change the stop colour.
- Parameters:
col (wx.Colour) – The new colour.
- Return type:
None
- SetPosition(self, pos)¶
Change the stop position.
- Parameters:
pos (float) – The new position, must always be in
[0
,1]
range.- Return type:
None
Properties¶
- Position¶
See
GetPosition
andSetPosition