FunctionGradient

Gradient
[IoId("00000000-f650-4f43-9fe3-22cf962b4d68")] public sealed class FunctionGradient : Gradient
A one dimensional colour gradient based on a colour space and channel functions.

Constructors

FunctionGradient

#
public FunctionGradient(
reader
)

FunctionGradient

#
public FunctionGradient(
space,
mapping,
f1,
f2,
f3,
fa = null
)

Properties

ApparentDomain

Gets the domain based on the Gradient.Mapping of this gradient. Note that this domain may be decreasing.
public (double lower, double upper) ApparentDomain { get; }
inherited fromGradient

F1

#
The function for the first channel.
public Function F1 { get; }

F2

#
The function for the second channel.
public Function F2 { get; }

F3

#
The function for the third channel.
public Function F3 { get; }

FA

#
The function for the alpha channel.
public Function FA { get; }

Interaction

Gets a user interaction object based on this gradient. Not all gradient types will have interaction objects.
public virtual GripGradientInteraction Interaction { get; }
inherited fromGradient

IntrinsicDomain

#
public override (double lower, double upper) IntrinsicDomain { get; }

Mapping

Gets the mapping from sampling space to gradient space.
public GradientMapping Mapping { get; }
inherited fromGradient

Space

#
Gets the colour space in which this gradient is defined.
public Space3 Space { get; }

Methods

ColourAt

Gets the exact colour at the given parameter.
public bool ColourAt(
parameter,
Evaluation parameter.
out Colour
colour
Colour result.
)
inherited fromGradient
True if the parameter is a valid one.

ColourAt

Gets the colour at the given parameter.
public Color ColourAt(
parameter
Evaluation parameter.
)
inherited fromGradient
True if the parameter is a valid one.

ColourAtInternal

#
protected override Colour ColourAtInternal(
gradientParameter
)

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.
protected virtual Gradient.GradientTexture CreateTextureCache()
inherited fromGradient

Draw

Draw this gradient as a horizontal progression. This method is optimized for speed and may not necessarily yield the exact result.
public virtual void Draw(
Graphics
graphics,
Graphics object to draw with.
RectangleF
rectangle,
Rectangle to fill.
lower,
Gradient parameter along left edge of rectangle.
upper
Gradient parameter along right edge of rectangle.
)
inherited fromGradient

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.
)
inherited fromGradient

IsConstant

Tests whether this gradient has a zero-length domain and whether the colours on either side are identical.
public bool IsConstant(
out Colour
colour
Colour inside domain.
)
inherited fromGradient
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.
public Gradient Remap(
t0,
New gradient lower limit.
t1
New gradient upper limit.
)
inherited fromGradient
Mapped gradient.

Remap

#
public override Gradient Remap(
newMapping
)
Gradient.Remap

RemapAutomatic

Remap this gradient to a new domain if the mapping has automatic lower or upper bounds.
public Gradient RemapAutomatic(
lower,
upper
)
inherited fromGradient

Store

#
public override void Store(
writer
)
Gradient.Store

ToBitmap

Render this gradient to a bitmap using exact per-pixel colours.
public Bitmap ToBitmap(
width,
Bitmap width.
height,
Bitmap height.
lower,
Gradient parameter at left edge of bitmap.
upper
Gradient parameter at right edge of bitmap.
)
inherited fromGradient
Bitmap.

ToBitmap

Render this gradient to a bitmap.
public Bitmap ToBitmap(
width,
Bitmap width.
height
Bitmap height.
)
inherited fromGradient
Bitmap.

ToString

#
public override string ToString()
Object.ToString

WithAutomaticLimits

Adjust the automatic bounds flags for this gradient.
public Gradient WithAutomaticLimits(
autoLower = true,
autoUpper = true
)
inherited fromGradient