Class: Wx::GraphicsGradientStop

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/gen/graphics_context.rb,
lib/wx/doc/graphics_context.rb

Overview

Note:

This class is untracked and should not be derived from nor instances extended!

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

Category: Graphics Device Interface (GDI)

Requires:

  • USE_GRAPHICS_CONTEXT

Instance Method Summary collapse

Constructor Details

#initialize(col = Wx::TRANSPARENT_COLOUR, pos = 0.0) ⇒ Wx::GraphicsGradientStop

Creates a stop with the given colour and position.

Parameters:

  • col (Wx::Colour) (defaults to: Wx::TRANSPARENT_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) (defaults to: 0.0)

    The stop position, must be in [0, 1] range with 0 being the beginning and 1 the end of the gradient.



65
# File 'lib/wx/doc/graphics_context.rb', line 65

def initialize(col=Wx::TRANSPARENT_COLOUR, pos=0.0) end

Instance Method Details

#get_colourWx::Colour, ... Also known as: colour

Return the stop colour.

Returns:



810
# File 'lib/wx/doc/gen/graphics_context.rb', line 810

def get_colour; end

#get_positionFloat Also known as: position

Return the stop position.

Returns:

  • (Float)


821
# File 'lib/wx/doc/gen/graphics_context.rb', line 821

def get_position; end

#set_colour(col) ⇒ void Also known as: colour=

This method returns an undefined value.

Change the stop colour.

Parameters:

  • col (Wx::Colour, String, Symbol)

    The new colour.



816
# File 'lib/wx/doc/gen/graphics_context.rb', line 816

def set_colour(col) end

#set_position(pos) ⇒ void Also known as: position=

This method returns an undefined value.

Change the stop position.

Parameters:

  • pos (Float)

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



827
# File 'lib/wx/doc/gen/graphics_context.rb', line 827

def set_position(pos) end