public sealed class Shape : IStorable
A collection of geometric properties for shapes.

Constructors

Shape

#
public Shape(CornerRadii corners, float thickness, float bar)
Create a new shape geometry instance.
corners (CornerRadii)Shape corner radius.
thickness (float)Shape thickness.
bar (float)Height of messaging bar.

Shape

#
public Shape(float corners = 3, float thickness = 3, float bar = 3)
Create a new shape geometry instance.
corners (float = 3)Shape corner radius.
thickness (float = 3)Shape thickness.
bar (float = 3)Height of messaging bar.

Shape

#
public Shape(IReader reader)
Deserialisation constructor.
reader (IReader)

Properties

Bar

#
public float Bar { get; }
Height of the messaging bar.

Corners

#
public CornerRadii Corners { get; }
Gets the corner radii of the shape.

Default

#
public static Shape Default { get; }
Gets the default shape description.

FontCode

#
public Font FontCode { get; }
Gets the font to use for code like data which must line up.

FontLoud

#
public Font FontLoud { get; }
Gets the font to use for loud and large text such as titles and names.

FontWord

#
public Font FontWord { get; }
Gets the font to use for readable text such as words and phrases.

Thickness

#
public float Thickness { get; }
Gets the visual thickness of the shape.

Methods

Interpolate

#
public Shape Interpolate(Shape other, float factor)
Interpolate between shapes.
other (Shape)Other shape.
factor (float)Interpolation factor.
Interpolated shape.

Store

#
public void Store(IWriter writer)
This method is called whenever the instance is required to serialize itself.
writer (IWriter)Writer object to serialize with.
Store

WithBar

#
public Shape WithBar(float bar)
Modify the bar height of this shape.
bar (float)

WithCorners

#
public Shape WithCorners(CornerRadii corners)
Modify the corner radii of this shape.
corners (CornerRadii)

WithCorners

#
public Shape WithCorners(float corners)
Modify the corner radii of this shape.
corners (float)

WithThickness

#
public Shape WithThickness(float thickness)
Modify the thickness of this shape.
thickness (float)