Represents a collection of GraphicGradientStop values for use with CreateLinearGradientBrush and CreateRadialGradientBrush.
The stops are maintained in order of position. If two or more stops are added with the same position then the one(s) added later come later. This can be useful for producing discontinuities in the colour gradient.
Notice that this class is write-once, you can’t modify the stops once they had been added.
New in version 2.9.1.
Initializes the gradient stops with the given boundary colours. |
|
Add a new stop. |
|
Returns the number of stops. |
|
Returns the end colour. |
|
Returns the start colour. |
|
Returns the stop at the given index. |
|
Set the end colour to col. |
|
Set the start colour to col. |
|
See |
|
See |
|
See |
wx.
GraphicsGradientStops
(object)¶Possible constructors:
GraphicsGradientStops(startCol=TransparentColour,
endCol=TransparentColour)
Represents a collection of GraphicGradientStop values for use with CreateLinearGradientBrush and CreateRadialGradientBrush.
__init__
(self, startCol=TransparentColour, endCol=TransparentColour)¶Initializes the gradient stops with the given boundary colours.
Creates a wx.GraphicsGradientStops instance with start colour given by startCol and end colour given by endCol.
Add
(self, *args, **kw)¶Add a new stop.
Add (self, stop)
stop (wx.GraphicsGradientStop) –
Add (self, col, pos)
col (wx.Colour) –
pos (float) –
GetCount
(self)¶Returns the number of stops.
int
Item
(self, n)¶Returns the stop at the given index.
n – The index, must be in [0
, GetCount
) range.
__getitem__
(self, n)¶__len__
(self)¶int
EndColour
¶See GetEndColour
and SetEndColour
StartColour
¶See GetStartColour
and SetStartColour