Search documentation of wx

# View Source wxGraphicsGradientStops (wx v2.4.2)

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

## Types

wxGraphicsGradientStops()

## Functions

add(This, Col, Pos)

Add a new stop.

destroy(This)

Destroys the object.

getCount(This)

Returns the number of stops.

getEndColour(This)

Returns the end colour.

getStartColour(This)

Returns the start colour.

item(This, N)

Returns the stop at the given index.

new()
new(Options)

Initializes the gradient stops with the given boundary colours.

setEndColour(This, Col)

Set the end colour to `col`.

setStartColour(This, Col)

Set the start colour to `col`.

# Types

Link to this type

# wxGraphicsGradientStops()

View Source

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

# Functions

Link to this function

# add(This, Col, Pos)

View Source

    -spec add(This, Col, Pos) -> ok
                 when This :: wxGraphicsGradientStops(), Col :: wx:wx_colour(), Pos :: number().

Add a new stop.

Link to this function

# destroy(This)

View Source

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

Destroys the object.

Link to this function

# getCount(This)

View Source

    -spec getCount(This) -> integer() when This :: wxGraphicsGradientStops().

Returns the number of stops.

Link to this function

# getEndColour(This)

View Source

    -spec getEndColour(This) -> wx:wx_colour4() when This :: wxGraphicsGradientStops().

Returns the end colour.

Link to this function

# getStartColour(This)

View Source

    -spec getStartColour(This) -> wx:wx_colour4() when This :: wxGraphicsGradientStops().

Returns the start colour.

Link to this function

# item(This, N)

View Source

    -spec item(This, N) -> {wx:wx_colour4(), float()} when This :: wxGraphicsGradientStops(), N :: integer().

Returns the stop at the given index.

Link to this function

# new()

View Source

    -spec new() -> wxGraphicsGradientStops().

Link to this function

# new(Options)

View Source

    -spec new([Option]) -> wxGraphicsGradientStops()
                 when 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`.

Link to this function

# setEndColour(This, Col)

View Source

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

Set the end colour to `col`.

Link to this function

# setStartColour(This, Col)

View Source

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

Set the start colour to `col`.