CanvasSkin

References
public sealed class CanvasSkin : IStorable
Immutable collection of canvas skin settings.

Constructors

CanvasSkin

#
Create a new canvas skin.
public CanvasSkin(
gridSkin,
Color
foreground,
Color
background,
Color
edge,
backgroundNoise
)

Fields

DefaultDim

#
The default canvas skin used for regular GH documents in dark mode.
public static readonly CanvasSkin DefaultDim

DefaultLit

#
The default canvas skin used for regular GH documents in bright mode.
public static readonly CanvasSkin DefaultLit

Properties

Background

#
Gets the canvas background colour, the portion to the left or up of the origin.
public Color Background { get; }

BackgroundNoise

#
Gets the noise strength for the background.
public float BackgroundNoise { get; }

Edge

#
Gets the colour of the canvas edge.
public Color Edge { get; }

Foreground

#
Gets the canvas foreground colour, the portion to the right and bottom of the origin.
public Color Foreground { get; }

GridSkin

#
Gets the grid properties of this canvas.
public GridSkin GridSkin { get; }

Methods

DrawCanvas

#
Draw this canvas skin to a graphics context.
public void DrawCanvas(
Graphics
graphics,
Graphics object.
projection,
Projection.
RectangleF
bounds,
Visible bounds.
minorFade,
Fade factor for minor grid lines.
majorFade
Face factor for major grid lines.
)
Explicit

IStorable.Store

#
void IStorable.Store(
writer
)
Store

Interpolate

#
Interpolate two canvas skins.
public CanvasSkin Interpolate(
other,
factor
)

WithBackground

#
Create a canvas skin with a different background colour.
public CanvasSkin WithBackground(
Color
background,
noise
)

WithEdge

#
Create a canvas skin with a different edge colour.
public CanvasSkin WithEdge(
Color
edge
)

WithForeground

#
Create a canvas skin with a different foreground colour.
public CanvasSkin WithForeground(
Color
foreground
)

WithGrid

#
Create a canvas skin with different grid properties.
public CanvasSkin WithGrid()