[IoId("00000000-078F-4D74-9913-1149129256C2")]
public sealed class GripGradient : Gradient, IEquatable<GripGradient>
A one dimensional colour gradient based on positional grips.
Constructors
GripGradient
#Create a new gradient from parameters and colours.
public GripGradient()
Progression
progression,
Interpolation for this gradient.
space,
Colour space for gradient.
parameters,
Grip parameters.
colours
Grip colours.
GripGradient
#Create a new gradient from grips.
public GripGradient()
Progression
progression,
Interpolation for this gradient.
space,
Colour space for gradient.
grips
Grips for this gradient.
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.
Overrides: Gradient.Interaction
IntrinsicDomain
#Gets the interval containing the defined interior of this gradient. Note that this refers to the mathematics underlying the gradient, the Gradient.ApparentDomain encodes the publicly facing domain of this gradient.
Overrides: Gradient.IntrinsicDomain
Mapping
Gets the mapping from sampling space to gradient space.
Indexers
Methods
ColourAt
Gets the exact colour at the given parameter.
Returns: True if the parameter is a valid one.
ColourAt
Gets the colour at the given parameter.
Returns: True if the parameter is a valid one.
ColourAtInternal
#Sample the gradient at the given gradient parameter.
Returns: Colour at parameter or null if gradient is undefined.
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.
Overrides: Gradient.Draw
Draw
Draw this gradient as a horizontal progression. This method is optimized for speed and may not necessarily yield the exact result.
public void Draw()
Graphics
graphics,
Graphics object to draw with.
RectangleF
rectangle
Rectangle to fill.
Equals
#EqualsMapped
#IsConstant
Tests whether this gradient has a zero-length domain and whether the colours on either side are identical.
Returns: True if gradient only has a single colour.
NormaliseMapping
#Adjust the grips so that the IntrinsicDomain matches the Gradient.ApparentDomain and the Gradient.Mapping becomes identity.
Remap
Create a new gradient which is similar to this gradient but remapped to a different interval.
Returns: Mapped gradient.
Remap
#Create a new gradient which is similar to this gradient but remapped to a different interval.
Returns: Mapped gradient.
Overrides: Gradient.Remap
RemapAutomatic
Remap this gradient to a new domain if the mapping has automatic lower or upper bounds.
Store
#This method is called whenever the instance is required to serialize itself.
Overrides: Gradient.Store
SurroundingGrips
#Gets the grips on either side of a parameter.
public void SurroundingGrips()
parameter,
Parameter.
out GradientGrip
left,
Grip to the left of or exactly at the parameter.
out GradientGrip
right
Grip to the right of the parameter.
ToBitmap
Render this gradient to a bitmap using exact per-pixel colours.
Returns: Bitmap.
ToBitmap
Render this gradient to a bitmap.
Returns: Bitmap.
ToString
#Returns a string that represents the current object.
Returns: A string that represents the current object.
Overrides: Object.ToString
WithAutomaticLimits
Adjust the automatic bounds flags for this gradient.
WithContinuousGrips
#Convert all discontinuous grips into continuous grips.
Returns: Modified gradient.