GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Table of Contents
  • wx.GraphicsGradientStops
  • Show Source
  • index
  • modules
  • next
  • previous
  • Home
  • Gallery
  • wx

This view

  • Original page
  • New address

GeezerVison is showing docs.wxpython.org — wx.GraphicsGradientStops — wxPython 4.3.2 Docs

phoenix_title 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 Class Hierarchy¶

Inheritance diagram for class GraphicsGradientStops:

Inheritance diagram of GraphicsGradientStops


method_summary Methods Summary¶

__init__

Initializes the gradient stops with the given boundary colours.

Add

Add a new stop.

GetCount

GetEndColour

GetStartColour

Item

SetEndColour

Set the end colour to col.

SetStartColour

Set the start colour to col.

__getitem__

__len__


property_summary Properties Summary¶

Count

See GetCount

EndColour

See GetEndColour and SetEndColour

StartColour

See GetStartColour and SetStartColour


api 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.

Parameters:
  • startCol (wx.Colour)

  • endCol (wx.Colour)

Return type:

None



Add(self, *args, **kw)¶

Add a new stop.

overload Overloaded Implementations:



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.



GetEndColour(self)¶
Return type:

wx.Colour

Returns:

The end colour.



GetStartColour(self)¶
Return type:

wx.Colour

Returns:

The start colour.



Item(self, n)¶
Parameters:

n – The index, must be in [0, GetCount ) range.

Return type:

wx.GraphicsGradientStop

Returns:

The stop at the given index.



SetEndColour(self, col)¶

Set the end colour to col.

Parameters:

col (wx.Colour)

Return type:

None



SetStartColour(self, col)¶

Set the start colour to col.

Parameters:

col (wx.Colour)

Return type:

None



__getitem__(self, n)¶
Return type:

wx.GraphicsGradientStop



__len__(self)¶
Return type:

int


Properties¶

Count¶

See GetCount



EndColour¶

See GetEndColour and SetEndColour



StartColour¶

See GetStartColour and SetStartColour

© Copyright 2012-2026, The wxPython Team. Created using Sphinx 9.1.0 and the python-docs-theme.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.