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)


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

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:



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

def add(*args) end

#get_countInteger Also known as: count

The number of stops.

Returns:

  • (Integer)


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

def get_count; end

#get_end_colourWx::Colour Also known as: end_colour

The end colour.

Returns:



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

def get_end_colour; end

#get_start_colourWx::Colour Also known as: start_colour

The start colour.

Returns:



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

def get_start_colour; end

#item(n) ⇒ Wx::GraphicsGradientStop

The stop at the given index.

Parameters:

  • n (unsigned)

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

Returns:



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

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:



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

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:



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

def set_start_colour(col) end