The SColorGradient class allow the user to edit a color gradient.
You cannot create a new color gradient. You can access to it by calling GetColorGradient() on a SMultiline, SPoly or SCloud. With this class you can manipulate color and cursor position of an existing color gradient.
More...
Public Types | |
enum | DisplayFlag { HIDE , SHOW_FOREGROUND , SHOW_BACKGROUND } |
Available options for the display of the gradient palette Use SColorGradient.HIDE. More... | |
enum | Interpolation { Linear , HSLCounterClockwise , HSLClockwise , HSLShortest , HSLLongest } |
Interpolation method to define how the color is interpolate between two cursors. More... | |
Public Slots | |
Array | AddCursor (Number Position) |
Add a new cursor in the color gradient. More... | |
Array | DeleteCursor (Number Index) |
Remove a peg of the color gradient. More... | |
Array | GetColorFromValue (Number value) |
To color from a specific value in the gradient. More... | |
Array | GetColUndefined () |
To get the undefined color of the color gradient. More... | |
Array | GetCursorInfo (Number Index) |
To get cursor information. More... | |
Number | GetNbCursor () |
Number | GetNbCursorMax () |
Array | GetRange () |
To get the maximal and minimal value of the color gradient. More... | |
Array | SetColAfter (Number Index, Number Red, Number Green, Number Blue, Number Alpha=-1) |
To set the color of a cursor after the value of the cursor. More... | |
Array | SetColBefore (Number Index, Number Red, Number Green, Number Blue, Number Alpha=-1) |
To set the color of a cursor before the value of the cursor. More... | |
SetColUndefined (Number Red, Number Green, Number Blue, Number Alpha=-1) | |
To set the undefined color of the color gradient. More... | |
Array | SetCursorPos (Number Index, Number Position) |
To set position of an indexed peg. More... | |
SetDisplayOption (DisplayFlag DisplayPalette) | |
You can choose how the palette will be displayed. More... | |
SetInterpolation (Interpolation Method) | |
To define how the color is interpolated between 2 cursors. More... | |
SetMagnification (Number magnification) | |
You can set the magnification (only for polyline inspection) More... | |
Array | SetNbCursor (Number NbCursor) |
To set the number of cursors of the color gradient You can set from 2 cursors to GetNbCursorMax() cursors, each of the band will have a unique color. More... | |
Array | SetRange (Number MinValue, Number MaxValue) |
To update the min and max values of the color gradient, and delete all invalid pegs. More... | |
String | toString () |
Get the type of the variable. More... | |
Public Slots inherited from SObject | |
Clear () | |
To deallocate memory of the object. More... | |
String | toString () |
Get the type of the variable. More... | |
The SColorGradient class allow the user to edit a color gradient.
You cannot create a new color gradient. You can access to it by calling GetColorGradient() on a SMultiline, SPoly or SCloud. With this class you can manipulate color and cursor position of an existing color gradient.
Available options for the display of the gradient palette
Use SColorGradient.HIDE.
Enumerator | |
---|---|
HIDE | Gradient is not displayed |
SHOW_FOREGROUND | Gradient is displayed in foreground |
SHOW_BACKGROUND | Gradient is displayed in background |
|
slot |
Add a new cursor in the color gradient.
Array.ErrorCode | The error code.
|
Array.Index | index of your new cursor |
|
slot |
Remove a peg of the color gradient.
Array.ErrorCode | The error code.
|
|
slot |
To color from a specific value in the gradient.
Array.ErrorCode | The error code.
|
Array.Red | The undefined red color between [0-1] |
Array.Green | The undefined green color between [0-1] |
Array.Blue | The undefined blue color between [0-1] |
|
slot |
To get the undefined color of the color gradient.
Array.Red | The undefined red color between [0-1] |
Array.Green | The undefined green color between [0-1] |
Array.Blue | The undefined blue color between [0-1] |
|
slot |
To get cursor information.
Array.ErrorCode | The error code.
|
Array.RedBefore | The red color before the cursor between [0-1]. |
Array.GreenBefore | The green color before the cursor between [0-1]. |
Array.BlueBefore | The blue color before the cursor between [0-1]. |
Array.RedAfter | The red color after the cursor between [0-1]. |
Array.GreenAfter | The green color after the cursor between [0-1]. |
Array.BlueAfter | The blue color after the cursor between [0-1]. |
Array.Position | The position of the cursor. |
|
slot |
Number | of cursor of the color gradient |
|
slot |
Number | maximal of cursor you can have in this color gradient |
|
slot |
To get the maximal and minimal value of the color gradient.
Array.Max | Maximal value. |
Array.Min | Minimal value. |
|
slot |
To set the color of a cursor after the value of the cursor.
Array.ErrorCode | The error code.
|
[in] | Index | index of the cursor between 0 and the number of cursor |
[in] | Red | Red color between [0-1] |
[in] | Green | Green color between [0-1] |
[in] | Blue | Blue color between [0-1] |
[in] | Alpha | Alpha value [0-1]. If < 0, do not change the current alpha |
|
slot |
To set the color of a cursor before the value of the cursor.
Array.ErrorCode | The error code.
|
[in] | Index | index of the cursor between 0 and the number of cursor |
[in] | Red | Red color between [0-1] |
[in] | Green | Green color between [0-1] |
[in] | Blue | Blue color between [0-1] |
[in] | Alpha | Alpha value [0-1]. If < 0, do not change the current alpha |
|
slot |
To set the undefined color of the color gradient.
[in] | Red | Red color between [0-1] |
[in] | Green | Green color between [0-1] |
[in] | Blue | Blue color between [0-1] |
[in] | Alpha | Alpha value [0-1]. If < 0, do not change the current alpha |
|
slot |
To set position of an indexed peg.
Array.ErrorCode | The error code.
|
|
slot |
You can choose how the palette will be displayed.
|
slot |
To define how the color is interpolated between 2 cursors.
|
slot |
You can set the magnification (only for polyline inspection)
magnification | greater than 0 |
|
slot |
To set the number of cursors of the color gradient
You can set from 2 cursors to GetNbCursorMax() cursors, each of the band will have a unique color.
Array.ErrorCode | The error code.
|
[in] | NbCursor | Number of cursor you want between 2 and GetNbCursorMax() |
|
slot |
To update the min and max values of the color gradient, and delete all invalid pegs.
Array.ErrorCode | The error code.
|
MinValue | the minimal value of the color gradient |
MaxValue | the maximal value of the color gradient |
|
slot |
Get the type of the variable.