Table Of Contents

Previous topic

GraphicsFont

Next topic

GraphicsGradientStops

This Page

phoenix_title GraphicsGradientStop

Represents a single gradient stop in a collection of gradient stops as represented by GraphicsGradientStops.

New in version 2.9.1.


class_hierarchy Inheritance Diagram

Inheritance diagram for class GraphicsGradientStop

Inheritance diagram of GraphicsGradientStop


method_summary Methods Summary

__init__ Creates a stop with the given colour and position.
GetColour Return the stop colour.
GetPosition Return the stop position.
SetColour Change the stop colour.
SetPosition Change the stop position.

property_summary Properties Summary

Colour See GetColour and SetColour
Position See GetPosition and 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.)

Methods



__init__(self, col=TransparentColour, pos=0.)

Creates a stop with the given colour and position.

Parameters:
  • col (Colour) – 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.
  • pos (float) – The stop position, must be in [0, 1] range with 0 being the beginning and 1 the end of the gradient.


GetColour(self)

Return the stop colour.

Return type: Colour


GetPosition(self)

Return the stop position.

Return type:float


SetColour(self, col)

Change the stop colour.

Parameters:col (Colour) – The new colour.


SetPosition(self, pos)

Change the stop position.

Parameters:pos (float) – The new position, must always be in [0, 1] range.

Properties



Colour

See GetColour and SetColour



Position

See GetPosition and SetPosition