Class: Wx::GraphicsGradientStops

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

Overview

Note:

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

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.

Category: Graphics Device Interface (GDI)

Requires:

  • USE_GRAPHICS_CONTEXT

Instance Method Summary collapse

Constructor Details

#initialize(startCol = Wx::TRANSPARENT_COLOUR, endCol = Wx::TRANSPARENT_COLOUR) ⇒ Wx::GraphicsGradientStops

Initializes the gradient stops with the given boundary colours.

Creates a Wx::GraphicsGradientStops instance with start colour given by startCol and end colour given by endCol.

Parameters:

  • startCol (Wx::Colour) (defaults to: Wx::TRANSPARENT_COLOUR)
  • endCol (Wx::Colour) (defaults to: Wx::TRANSPARENT_COLOUR)


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

def initialize(startCol=Wx::TRANSPARENT_COLOUR, endCol=Wx::TRANSPARENT_COLOUR) end

Instance Method Details

#add(stop) ⇒ void #add(col, pos) ⇒ void

Overloads:

  • #add(stop) ⇒ void

    This method returns an undefined value.

    Add a new stop.

    Parameters:

  • #add(col, pos) ⇒ void

    This method returns an undefined value.

    Add a new stop.

    Parameters:



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

def add(*args) end

#get_countInteger Also known as: count

Returns the number of stops.

Returns:

  • (Integer)


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

def get_count; end

#get_end_colourWx::Colour Also known as: end_colour

Returns the end colour.

Returns:



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

def get_end_colour; end

#get_start_colourWx::Colour Also known as: start_colour

Returns the start colour.

Returns:



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

def get_start_colour; end

#item(n) ⇒ Wx::GraphicsGradientStop

Returns the stop at the given index.

Parameters:

  • n (unsigned)

    The index, must be in [0, #get_count) range.

Returns:



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

def item(n) end

#set_end_colour(col) ⇒ void Also known as: end_colour=

This method returns an undefined value.

Set the end colour to col.

Parameters:



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

def set_end_colour(col) end

#set_start_colour(col) ⇒ void Also known as: start_colour=

This method returns an undefined value.

Set the start colour to col.

Parameters:



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

def set_start_colour(col) end