Class juce.ColourGradient
Colour Gradient.
Is a pointer to a JUCE ColourGradient
Constructors
juce.ColourGradient (colour1, x1, y1, colour2, x2, y2, isRadial) | Constuctor. |
Methods
juce.ColourGradient:addColour (proportionAlongGradient, colour) |
Add colour. |
juce.ColourGradient:removeColour (index) | Remove colour. |
juce.ColourGradient:multiplyOpacity (multiplier) | Multiply opacity. |
juce.ColourGradient:getNumColours () | Get number colour. |
juce.ColourGradient:getColour (index) | Get colour. |
juce.ColourGradient:setColour (index, newColour) | Get colour. |
juce.ColourGradient:getColourAtPosition (position) | Get interpolated colour |
Constructors
- juce.ColourGradient (colour1, x1, y1, colour2, x2, y2, isRadial)
-
Constuctor.
Parameters:
- colour1 juce.Colour colour at the beginning of the gradient
- x1 coordinates of colour1
- y1 coordinates of colour1
- colour2 juce.Colour colour at the end of the gradient
- x2 coordinates of colour2
- y2 coordinates of colour2
- isRadial boolean whether the gradient should be linear or radial
Methods
-
juce.ColourGradient:addColour
(proportionAlongGradient, colour) -
Add colour.
Any number of colours can be added between the start and end of the gradient.
Parameters:
- proportionAlongGradient
- colour juce.Colour
Returns:
-
the new colour's index
- juce.ColourGradient:removeColour (index)
-
Remove colour.
Parameters:
- index colour index between 0 and getNumColours() - 1
- juce.ColourGradient:multiplyOpacity (multiplier)
-
Multiply opacity.
Parameters:
- multiplier factor to multiply the alpha values by
- juce.ColourGradient:getNumColours ()
-
Get number colour.
Returns:
-
the number of colours
- juce.ColourGradient:getColour (index)
-
Get colour.
Parameters:
- index colour index between 0 and getNumColours() - 1
Returns:
-
juce.Colour
the coulour at the specified index
- juce.ColourGradient:setColour (index, newColour)
-
Get colour.
Parameters:
- index colour index between 0 and getNumColours() - 1
- newColour juce.Colour
- juce.ColourGradient:getColourAtPosition (position)
-
Get interpolated colour
Parameters:
- position the position between 0 and 1
Returns:
-
juce.Colour
the interpolated colour at the specified position