FunctionGradient
GradientA one dimensional colour gradient based on a colour space and channel functions.
Constructors
Properties
ApparentDomain
Gets the domain based on the Gradient.Mapping of this gradient. Note that this domain may be decreasing.
Interaction
Gets a user interaction object based on this gradient. Not all gradient types will have interaction objects.
IntrinsicDomain
#Overrides: Gradient.IntrinsicDomain
Mapping
Gets the mapping from sampling space to gradient space.
Methods
ColourAt
Gets the exact colour at the given parameter.
Parameters:
| parameter (double) | Evaluation parameter. |
Returns: True if the parameter is a valid one.
ColourAtInternal
#Parameters:
| gradientParameter (double) |
Overrides: Gradient.ColourAtInternal
CreateTextureCache
Create a texture cache object for displaying this texture in the UI. The width of the texture bitmap ought to be decided by the callee.
Draw
Draw this gradient as a horizontal progression. This method is optimized for speed and may not necessarily yield the exact result.
Draw
public void Draw(Graphics graphics, RectangleF rectangle)
Draw this gradient as a horizontal progression. This method is optimized for speed and may not necessarily yield the exact result.
Parameters:
| graphics (Graphics) | Graphics object to draw with. |
| rectangle (RectangleF) | Rectangle to fill. |
IsConstant
Tests whether this gradient has a zero-length domain and whether the colours on either side are identical.
Parameters:
| colour (out Colour) | Colour inside domain. |
Returns: True if gradient only has a single colour.
Remap
Create a new gradient which is similar to this gradient but remapped to a different interval.
RemapAutomatic
Remap this gradient to a new domain if the mapping has automatic lower or upper bounds.
ToBitmap
Render this gradient to a bitmap using exact per-pixel colours.