Constructors
Polkadots
#public Polkadots(ColourShader colour0, ColourShader colour1, int size, float threshold = 0.7, Angle angle = default(Angle))
Create a new angled polkadot pattern.
Parameters:
| colour0 (ColourShader) | Colour for odd squares. |
| colour1 (ColourShader) | Colour for even squares. |
| size (int) | Size of squares. |
| threshold (float = 0.7) | Dot size threshold. |
| angle (Angle = null) | Angle of squares. |
Methods
ColourAt
#Evaluate this shader at a specific ray location.
Parameters:
| ray (Ray) | Coincident ray. |
| stack (IObjectStack) | Object stack context. |
Overrides: ColourShader.ColourAt
Dilate
Apply a dilation (or scaling) transformation to this shader.
Fade
Add a transparency layer to this shader.
Parameters:
| transparency (ValueShader) | Transparency layer. |
| combine (bool) | If true, overlay transparency is combined with existing transparency. If false, overlay transparency overrules the existing transparency. |
Returns: Modified shader.
Parameters:
| transparency (ValueShader) | Transparency layer. |
Returns: Modified shader.
ResolveColour
Utility function for resolving a colour with the background.
Parameters:
| colour (Color) | Colour to resolve. |
| ray (Ray) | Ray associated with colour location. |
| stack (IObjectStack) | Object stack context. |
Returns: Resolved colour.
Parameters:
| angle (Angle) | Rotation angle (counter-clockwise). |
Returns: Rotated shader.
Transform
Apply a custom transformation to this shader.
Parameters:
| transform (Transform2D) | Transformation. |
Returns: Transformed shader.
Translate
Apply a translation transformation to this shader.