GridShader

ColourShader
public sealed class GridShader : ColourShader
Implements a shader for a graphpaper like grid.

Constructors

GridShader

#
Create a new grid shader.
public GridShader(
transform,
Transform of unit grid.
background,
Background colour.
Color
lines,
Line colour.
Color
xAxis,
X axis colour.
Color
yAxis,
Y axis colour.
frequency
Thick line frequency.
)

GridShader

#
Create a new grid shader.
public GridShader(
transform,
Transform of unit grid.
background,
Background colour.
Color
lines,
Line colour.
frequency
Thick line frequency.
)

Methods

ColourAt

#
Evaluate this shader at a specific ray location.
public override Color ColourAt(
ray,
Coincident ray.
stack
Object stack context.
)

Dilate

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

Fade

Add a transparency layer to this shader.
public ColourShader Fade(
transparency,
Transparency layer.
combine
If true, overlay transparency is combined with existing transparency. If false, overlay transparency overrules the existing transparency.
)
inherited fromColourShader
Modified shader.

Fade

Add a transparency layer to this shader.
public ColourShader Fade(
transparency
Transparency layer.
)
inherited fromColourShader
Modified shader.

ResolveColour

Utility function for resolving a colour with the background.
protected Color ResolveColour(
Color
colour,
Colour to resolve.
ray,
Ray associated with colour location.
stack
Object stack context.
)
inherited fromColourShader
Resolved colour.

Rotate

Apply a rotation transformation to this shader.
public ColourShader Rotate(
angle
Rotation angle (counter-clockwise).
)
inherited fromColourShader
Rotated shader.

Transform

Apply a custom transformation to this shader.
public ColourShader Transform(
transform
Transformation.
)
inherited fromColourShader
Transformed shader.

Translate

Apply a translation transformation to this shader.
public ColourShader Translate(
dx,
Horizontal translation.
dy
Vertical translation.
)
inherited fromColourShader
Translated shader.