LineStyle

References
public class LineStyle
Bundles gridlines property.

Constructors

LineStyle

#
public LineStyle(Color minorColour, Color majorColour, LineType lineType, float thickness, float spacing, int frequency)
Create new grid linestyle.
minorColour (Color)
majorColour (Color)
lineType (LineType)
thickness (float)
spacing (float)
frequency (int)

Properties

Default

#
public static LineStyle Default { get; }
Gets the default grid lines properties.

DefaultTight

#
public static LineStyle DefaultTight { get; }
Gets the default grid lines properties for tight grids.

Frequency

#
public int Frequency { get; }
Gets the frequency with which major grid lines appear.

LineType

#
public LineType LineType { get; }
Gets the the line style.

MajorColour

#
public Color MajorColour { get; }
Gets the colour in which major grid lines are drawn.

MinorColour

#
public Color MinorColour { get; }
Gets the colour in which minor grid lines are drawn.

Spacing

#
public float Spacing { get; }
Gets at what visual separation the fading in of new minor grid lines starts.

Thickness

#
public float Thickness { get; }
Gets the thickness of minor grid lines.

Methods

CreatePen

#
public Pen CreatePen(float fade)
Create the edge to use for the negative portion of the line.
fade (float)Line fade factor. Factors between zero and one yield an interpolation between transparent and thin lines. Factors between one and two yield an interpolation between thin and thick lines. Factors over two just yield thick lines.
Pen or null if style is hidden.

WithColours

#
public LineStyle WithColours(Color minor, Color major)
Swap out the line colours.
minor (Color)
major (Color)

WithFrequency

#
public LineStyle WithFrequency(int frequency)
Modify the thin/thick frequency.
frequency (int)

WithLineType

#
public LineStyle WithLineType(LineType type)
Swap out the line type.
type (LineType)

WithSpacing

#
public LineStyle WithSpacing(float spacing)
Modify the spacing for the narrowest line-bundle.
spacing (float)

WithThickness

#
public LineStyle WithThickness(float thickness)
Swap out the line thickness.
thickness (float)