GradientRadial

ValueShader
public sealed class GradientRadial : ValueShader
Implements a shader for radial gradients.

Constructors

GradientRadial

#
public GradientRadial(float x, float y, float radius0, float radius1, Progression mapping)
Create a new gradient fill.
x (float)Centre x.
y (float)Centre y.
radius0 (float)First radius.
radius1 (float)Second radius.
mapping (Progression)Mapping behaviour.

GradientRadial

#
public GradientRadial(PointF centre, float radius0, float radius1, Progression mapping)
Create a new gradient fill.
centre (PointF)Gradient centre point.
radius0 (float)Radius associated with start of gradient.
radius1 (float)Radius associated with end of gradient.
mapping (Progression)Mapping behaviour.

Methods

Dilate

public ValueShader Dilate(double sx, double sy)
Apply a dilation (or scaling) transformation to this shader.
inherited fromValueShader
sx (double)Horizontal dilation.
sy (double)Vertical dilation.
Dilated shader.

Flip

protected double Flip(double value, double limit)
Repeat and flip a value within a [0, limit] domain.
inherited fromValueShader
value (double)
limit (double)

Flip

protected float Flip(float value, float limit)
Repeat and flip a value within a [0, limit] domain.
inherited fromValueShader
value (float)
limit (float)

Rotate

public ValueShader Rotate(Angle angle)
Apply a rotation transformation to this shader.
inherited fromValueShader
angle (Angle)Rotation angle (counter-clockwise).
Rotated shader.

Transform

public ValueShader Transform(Transform2D transform)
Apply a custom transformation to this shader.
inherited fromValueShader
transform (Transform2D)Transformation.
Transformed shader.

Translate

public ValueShader Translate(double dx, double dy)
Apply a translation transformation to this shader.
inherited fromValueShader
dx (double)Horizontal translation.
dy (double)Vertical translation.
Translated shader.

ValueAt

#
public override float ValueAt(Ray ray, IObjectStack stack)
Evaluate this shader at a specific ray location.
ray (Ray)Coincident ray.
stack (IObjectStack)Object stack context.