wx.GraphicsGradientStops¶
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.
Added in version 2.9.1.
Class Hierarchy¶
Methods Summary¶
Initializes the gradient stops with the given boundary colours. |
|
Add a new stop. |
|
Set the end colour to col. |
|
Set the start colour to col. |
|
Properties Summary¶
See |
|
See |
|
See |
Class API¶
- class wx.GraphicsGradientStops(object)¶
Possible constructors:
GraphicsGradientStops(startCol=TransparentColour, endCol=TransparentColour) -> None
Represents a collection of GraphicGradientStop values for use with CreateLinearGradientBrush and CreateRadialGradientBrush.
Methods¶
- __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)
- Parameters:
stop (wx.GraphicsGradientStop)
- Return type:
None
Add (self, col, pos)
- Parameters:
col (wx.Colour)
pos (float)
- Return type:
None
- GetCount(self)¶
- Return type:
int
- Returns:
The number of stops.
- Item(self, n)¶
- Parameters:
n – The index, must be in
[0,GetCount) range.- Return type:
- Returns:
The stop at the given index.
- SetStartColour(self, col)¶
Set the start colour to col.
- Parameters:
col (wx.Colour)
- Return type:
None
- __getitem__(self, n)¶
- Return type:
- __len__(self)¶
- Return type:
int
Properties¶
- EndColour¶
See
GetEndColourandSetEndColour
- StartColour¶
See
GetStartColourandSetStartColour
