.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2020 by Total Control Software License: wxWindows License .. include:: headings.inc .. _wx.GraphicsGradientStops: ========================================================================================================================================== |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. .. versionadded:: 2.9.1 | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class GraphicsGradientStops:
| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.GraphicsGradientStops.__init__` Initializes the gradient stops with the given boundary colours. :meth:`~wx.GraphicsGradientStops.Add` Add a new stop. :meth:`~wx.GraphicsGradientStops.GetCount` Returns the number of stops. :meth:`~wx.GraphicsGradientStops.GetEndColour` Returns the end colour. :meth:`~wx.GraphicsGradientStops.GetStartColour` Returns the start colour. :meth:`~wx.GraphicsGradientStops.Item` Returns the stop at the given index. :meth:`~wx.GraphicsGradientStops.SetEndColour` Set the end colour to `col`. :meth:`~wx.GraphicsGradientStops.SetStartColour` Set the start colour to `col`. :meth:`~wx.GraphicsGradientStops.__getitem__` :meth:`~wx.GraphicsGradientStops.__len__` ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~wx.GraphicsGradientStops.Count` See :meth:`~wx.GraphicsGradientStops.GetCount` :attr:`~wx.GraphicsGradientStops.EndColour` See :meth:`~wx.GraphicsGradientStops.GetEndColour` and :meth:`~wx.GraphicsGradientStops.SetEndColour` :attr:`~wx.GraphicsGradientStops.StartColour` See :meth:`~wx.GraphicsGradientStops.GetStartColour` and :meth:`~wx.GraphicsGradientStops.SetStartColour` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: wx.GraphicsGradientStops(object) **Possible constructors**:: GraphicsGradientStops(startCol=TransparentColour, endCol=TransparentColour) Represents a collection of GraphicGradientStop values for use with CreateLinearGradientBrush and CreateRadialGradientBrush. .. method:: __init__(self, startCol=TransparentColour, endCol=TransparentColour) Initializes the gradient stops with the given boundary colours. Creates a :ref:`wx.GraphicsGradientStops` instance with start colour given by `startCol` and end colour given by `endCol`. :param `startCol`: :type `startCol`: wx.Colour :param `endCol`: :type `endCol`: wx.Colour .. method:: Add(self, *args, **kw) Add a new stop. |overload| Overloaded Implementations: :html:`

` **Add** `(self, stop)` :param `stop`: :type `stop`: wx.GraphicsGradientStop :html:`

` **Add** `(self, col, pos)` :param `col`: :type `col`: wx.Colour :param `pos`: :type `pos`: float :html:`

` .. method:: GetCount(self) Returns the number of stops. :rtype: `int` .. method:: GetEndColour(self) Returns the end colour. :rtype: :ref:`wx.Colour` .. method:: GetStartColour(self) Returns the start colour. :rtype: :ref:`wx.Colour` .. method:: Item(self, n) Returns the stop at the given index. :param `n`: The index, must be in ``[0``, :meth:`GetCount` ) range. :rtype: :ref:`wx.GraphicsGradientStop` .. method:: SetEndColour(self, col) Set the end colour to `col`. :param `col`: :type `col`: wx.Colour .. method:: SetStartColour(self, col) Set the start colour to `col`. :param `col`: :type `col`: wx.Colour .. method:: __getitem__(self, n) .. method:: __len__(self) :rtype: `SIP_SSIZE_T` .. attribute:: Count See :meth:`~wx.GraphicsGradientStops.GetCount` .. attribute:: EndColour See :meth:`~wx.GraphicsGradientStops.GetEndColour` and :meth:`~wx.GraphicsGradientStops.SetEndColour` .. attribute:: StartColour See :meth:`~wx.GraphicsGradientStops.GetStartColour` and :meth:`~wx.GraphicsGradientStops.SetStartColour`