.. include:: headings.inc .. _GraphicsGradientStop: ========================================================================================================================================== |phoenix_title| **GraphicsGradientStop** ========================================================================================================================================== Represents a single gradient stop in a collection of gradient stops as represented by :ref:`GraphicsGradientStops`. .. versionadded:: 2.9.1 | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **GraphicsGradientStop** .. raw:: html

Inheritance diagram of GraphicsGradientStop

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~GraphicsGradientStop.__init__` Creates a stop with the given colour and position. :meth:`~GraphicsGradientStop.GetColour` Return the stop colour. :meth:`~GraphicsGradientStop.GetPosition` Return the stop position. :meth:`~GraphicsGradientStop.SetColour` Change the stop colour. :meth:`~GraphicsGradientStop.SetPosition` Change the stop position. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~GraphicsGradientStop.Colour` See :meth:`~GraphicsGradientStop.GetColour` and :meth:`~GraphicsGradientStop.SetColour` :attr:`~GraphicsGradientStop.Position` See :meth:`~GraphicsGradientStop.GetPosition` and :meth:`~GraphicsGradientStop.SetPosition` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: GraphicsGradientStop(object) Represents a single gradient stop in a collection of gradient stops as represented by GraphicsGradientStops. **Possible constructors**:: GraphicsGradientStop(col=TransparentColour, pos=0.) .. method:: __init__(self, col=TransparentColour, pos=0.) Creates a stop with the given colour and position. :param `col`: 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. :type `col`: Colour :param `pos`: The stop position, must be in ``[0``, ``1]`` range with 0 being the beginning and 1 the end of the gradient. :type `pos`: float .. method:: GetColour(self) Return the stop colour. :rtype: :ref:`Colour` .. method:: GetPosition(self) Return the stop position. :rtype: `float` .. method:: SetColour(self, col) Change the stop colour. :param `col`: The new colour. :type `col`: Colour .. method:: SetPosition(self, pos) Change the stop position. :param `pos`: The new position, must always be in ``[0``, ``1]`` range. :type `pos`: float .. attribute:: Colour See :meth:`~GraphicsGradientStop.GetColour` and :meth:`~GraphicsGradientStop.SetColour` .. attribute:: Position See :meth:`~GraphicsGradientStop.GetPosition` and :meth:`~GraphicsGradientStop.SetPosition`