Gradient data type (CUSTOMDATATYPE_GRADIENT) for the GradientCustomGui GUI.
This type is called by value.
Parameters: | v (Gradient) – Copy constructor. |
---|---|
Return type: | Gradient |
Returns: | The new gradient. |
Returns a hash of the whole gradient state, including the needles, colors and interpolation type.:
print hash(obj) #hash calls obj.__hash__()
Return type: | int |
---|---|
Returns: | Hash value |
Inverts the knots.
Return type: | bool |
---|
:return:**True**if successful, otherwise False.
Inverts the knots.
Flushes all knots.
Initializes the renderer.
Return type: | bool |
---|---|
Returns: | True if successfull, otherwise False. |
Free the render.
Calculates a gradient pixel. Needs InitRender() before.
Parameters: | pos (float) – X position. |
---|---|
Return type: | Vector |
Returns: | Calculated pixel. |
Insert a knot. Not passed arguments will be set with default values.
Parameters: |
|
---|---|
Return type: |
int |
Returns: |
The new knot Note The new knot index is GetKnotCount() - 1 |
Delete a knot.
Parameters: |
index (int) –
index knot. Note 0 <= index < GetKnotCount() |
---|
Returns the information about a knot.
Parameters: | index (int) – The index. |
---|
Note
The new knot index has to be 0 <= index < Gradient.GetKnotCount()
Check out this small example how to use:
col, brightness, pos, bias, index = gradient.GetKnot(index)
Parameters: |
|
---|
Set the values of a knot. Just the passed arguments will be set, the other will be discarded.
Parameters: |
|
---|
Gets a data item from the gradient container.
Parameters: |
id (int) –
One of the following flags:
|
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: | Depends on id. | ||||||||||||
Returns: | The data. |
Gets a data item from the gradient container.
Parameters: |
|
---|
Gets the knot count.
Return type: | int |
---|---|
Returns: | Knot count. |