Class: Wx::GraphicsGradientStops
- Inherits:
-
Object
- Object
- Wx::GraphicsGradientStops
- Defined in:
- lib/wx/doc/gen/graphics_context.rb
Overview
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)
Instance Method Summary collapse
- #add(*args) ⇒ Object
-
#get_count ⇒ Integer
(also: #count)
Returns the number of stops.
-
#get_end_colour ⇒ Wx::Colour
(also: #end_colour)
Returns the end colour.
-
#get_start_colour ⇒ Wx::Colour
(also: #start_colour)
Returns the start colour.
-
#initialize(startCol = Wx::TRANSPARENT_COLOUR, endCol = Wx::TRANSPARENT_COLOUR) ⇒ Wx::GraphicsGradientStops
constructor
Initializes the gradient stops with the given boundary colours.
-
#item(n) ⇒ Wx::GraphicsGradientStop
Returns the stop at the given index.
-
#set_end_colour(col) ⇒ void
(also: #end_colour=)
Set the end colour to col.
-
#set_start_colour(col) ⇒ void
(also: #start_colour=)
Set the start colour to col.
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.
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
853 |
# File 'lib/wx/doc/gen/graphics_context.rb', line 853 def add(*args) end |
#get_count ⇒ Integer Also known as: count
Returns the number of stops.
870 |
# File 'lib/wx/doc/gen/graphics_context.rb', line 870 def get_count; end |
#get_end_colour ⇒ Wx::Colour Also known as: end_colour
Returns the end colour.
892 |
# File 'lib/wx/doc/gen/graphics_context.rb', line 892 def get_end_colour; end |
#get_start_colour ⇒ Wx::Colour Also known as: start_colour
Returns the start colour.
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.
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.
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.
876 |
# File 'lib/wx/doc/gen/graphics_context.rb', line 876 def set_start_colour(col) end |