Version: 3.3.0
wxGraphicsGradientStop Class Reference

#include <wx/graphics.h>

Detailed Description

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

Library:  wxCore
Category:  Graphics Device Interface (GDI)

Public Member Functions

 wxGraphicsGradientStop (wxColour col=wxTransparentColour, float pos=0.)
 Creates a stop with the given colour and position. More...
const wxColourGetColour () const
 Return the stop colour. More...
void SetColour (const wxColour &col)
 Change the stop colour. More...
float GetPosition () const
 Return the stop position. More...
void SetPosition (float pos)
 Change the stop position. More...

Constructor & Destructor Documentation

◆ wxGraphicsGradientStop()

wxGraphicsGradientStop::wxGraphicsGradientStop ( wxColour  col = wxTransparentColour,
float  pos = 0. 

Creates a stop with the given colour and position.

colThe 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.
posThe stop position, must be in [0, 1] range with 0 being the beginning and 1 the end of the gradient.

Member Function Documentation

◆ GetColour()

const wxColour& wxGraphicsGradientStop::GetColour ( ) const

Return the stop colour.

◆ GetPosition()

float wxGraphicsGradientStop::GetPosition ( ) const

Return the stop position.

◆ SetColour()

void wxGraphicsGradientStop::SetColour ( const wxColour col)

Change the stop colour.

colThe new colour.

◆ SetPosition()

void wxGraphicsGradientStop::SetPosition ( float  pos)

Change the stop position.

posThe new position, must always be in [0, 1] range.