wxGraphicsGradientStops (wx v2.5.4)

Copy Markdown View Source

Represents a collection of wxGraphicGradientStop 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.

Since: 2.9.1

wxWidgets docs: wxGraphicsGradientStops

Summary

Functions

Add a new stop.

Destroys the object

Returns the number of stops.

Returns the end colour.

Returns the start colour.

Returns the stop at the given index.

Initializes the gradient stops with the given boundary colours.

Set the end colour to col.

Set the start colour to col.

Types

wxGraphicsGradientStops()

-type wxGraphicsGradientStops() :: wx:wx_object().

Functions

add(This, Col, Pos) -> ok

Types

This = wxGraphicsGradientStops()
Col = wx:wx_colour()
Pos = number()

Add a new stop.

destroy(This :: wxGraphicsGradientStops()) -> ok

Destroys the object

getCount(This :: wxGraphicsGradientStops()) -> integer()

Returns the number of stops.

getEndColour(This :: wxGraphicsGradientStops()) -> wx:wx_colour4()

Returns the end colour.

getStartColour(This :: wxGraphicsGradientStops()) -> wx:wx_colour4()

Returns the start colour.

item(This, N) -> Result

Types

This = wxGraphicsGradientStops()
N = integer()
Result = {wx:wx_colour4(), float()}

Returns the stop at the given index.

new() ≡ new([])

new(Options :: [Option]) -> Result

Types

Result = wxGraphicsGradientStops()
Option = {startCol, wx:wx_colour()} | {endCol, wx:wx_colour()}

Initializes the gradient stops with the given boundary colours.

Creates a wxGraphicsGradientStops instance with start colour given by startCol and end colour given by endCol.

setEndColour(This :: wxGraphicsGradientStops(), Col :: wx:wx_colour()) -> ok

Set the end colour to col.

setStartColour(This :: wxGraphicsGradientStops(), Col :: wx:wx_colour()) -> ok

Set the start colour to col.