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)
The number of stops.
-
#get_end_colour ⇒ Wx::Colour
(also: #end_colour)
The end colour.
-
#get_start_colour ⇒ Wx::Colour
(also: #start_colour)
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
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.
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
913 |
# File 'lib/wx/doc/gen/graphics_context.rb', line 913 def add(*args) end |
#get_count ⇒ Integer Also known as: count
The number of stops.
934 |
# File 'lib/wx/doc/gen/graphics_context.rb', line 934 def get_count; end |
#get_end_colour ⇒ Wx::Colour Also known as: end_colour
The end colour.
960 |
# File 'lib/wx/doc/gen/graphics_context.rb', line 960 def get_end_colour; end |
#get_start_colour ⇒ Wx::Colour Also known as: start_colour
The start colour.
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.
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.
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.
940 |
# File 'lib/wx/doc/gen/graphics_context.rb', line 940 def set_start_colour(col) end |