Builder

References
public sealed class Builder
Provides a pipeline for populating vector icons.

Constructors

Builder

#
public Builder(int size)
Create an empty icon builder.
size (int)Target size of icon.

Builder

#
public Builder(int width, int height)
Create an empty icon builder.
width (int)Target width of icon.
height (int)Target height of icon.

Properties

CurrentEdge

#
public Edge CurrentEdge { get; }
Gets the current edge edge.

CurrentFill

#
public Fill CurrentFill { get; }
Gets the current fill brush.

CurrentOrder

#
public FillEdgeOrder CurrentOrder { get; }
Gets the current draw order value.

CurrentRank

#
public int CurrentRank { get; }
Gets the current rank.

CurrentStyle

#
public VectorStyle CurrentStyle { get; }
Gets the current style. The style is a mashup of the order, edge and fill states.

Size

#
public Size Size { get; }
Gets the size of this icon. The 'Current' prefix is for naming consistency, the size is set from the constructor and never changes during the lifetime of the builder.

Methods

Arc

#
public void Arc(Arc arc)
Add an arc to this icon.
arc (Arc)

Arc

#
public void Arc(ArcF arc, string state = null)
Add an arc to this icon.
arc (ArcF)
state (string = null)

Arrow

#
public bool Arrow(PointF tail, PointF tip, float size)
Add a standard fixed arrow shape to this icon. This method adds a line (for the arrowshaft) and a polyline (for the arrowhead).
tail (PointF)Tail point.
tip (PointF)Tip point.
size (float)Size of arrowhead.

Bezier

#
public void Bezier(BezierF bezier, string state = null)
Add a bezier curve to this icon.
bezier (BezierF)
state (string = null)

Bezier

#
public void Bezier(Bow bezier)
Add a bezier curve to this icon.
bezier (Bow)

Bezier

#
public void Bezier(double ax, double ay, double bx, double by, double cx, double cy, double dx, double dy, string state = null)
Add a bezier curve to this icon.
ax (double)
ay (double)
bx (double)
by (double)
cx (double)
cy (double)
dx (double)
dy (double)
state (string = null)

Bezier

#
public void Bezier(PointF a, PointF b, PointF c, PointF d, string state = null)
Add a bezier curve to this icon.
a (PointF)
b (PointF)
c (PointF)
d (PointF)
state (string = null)

Box

#
public void Box(Box box)
Add a rectangle to this icon.
box (Box)

Box

#
public void Box(double ax, double ay, double bx, double by, string state = null)
Add a rectangle to this icon.
ax (double)
ay (double)
bx (double)
by (double)
state (string = null)

Box

#
public void Box(RectangleF box, string state = null)
Add a rectangle to this icon.
box (RectangleF)
state (string = null)

Circle

#
public void Circle(Cir circle)
Add a circle to this icon.
circle (Cir)

Circle

#
public void Circle(CircleF circle, string state = null)
Add a circle to this icon.
circle (CircleF)
state (string = null)

Circle

#
public void Circle(double cx, double cy, double radius, string state = null)
Add a circle to this icon.
cx (double)
cy (double)
radius (double)
state (string = null)

Curve

#
public void Curve(params object[] vertices)
Add a polyarc curve to this icon. Polyarcs are curves consisting of lines and circular arcs. Consecutive points are always connected with a straight line, consecutive points with an angle or direction constraint in between them are connected by a tangent arc.
vertices (params object[])Array of vertices. A vertex is either a coordinate indicating an actual corner on the compound, or a tangency constraint indicating the start tangent of the next segment. Coordinates must be specified as either Point or PointF, tangency constraints must be either Size, SizeF, or Angle, specified clockwise from positive x.

Curve

#
public void Curve(Que curve)
Add a compound curve to this icon.
curve (Que)

Element

#
[EditorBrowsable(EditorBrowsableState.Never)] public bool Element(IShape shape)
Add a shape to the icon.
shape (IShape)Shape to add.

Ellipse

#
public void Ellipse(double cx, double cy, double radiusX, double radiusY, string state = null)
Add an ellipse to this icon.
cx (double)
cy (double)
radiusX (double)
radiusY (double)
state (string = null)

Ellipse

#
public void Ellipse(Egg ellipse)
Add an ellipse to this icon.
ellipse (Egg)

Ellipse

#
public void Ellipse(EllipseF ellipse, string state = null)
Add an ellipse to this icon.
ellipse (EllipseF)
state (string = null)

Line

#
public void Line(double ax, double ay, double bx, double by, string state = null)
Add a line to this icon.
ax (double)
ay (double)
bx (double)
by (double)
state (string = null)

Line

#
public void Line(Lin line)
Add a line to this icon.
line (Lin)

Line

#
public void Line(LineF line, string state = null)
Add a line to this icon.
line (LineF)
state (string = null)

Line

#
public void Line(PointF a, PointF b, string state = null)
Add a line to this icon.
a (PointF)
b (PointF)
state (string = null)

Lune

#
public void Lune(CircleF disc, float angle, float width)
Add a lune to this icon. A lune is an arc with an elliptic arc on the inside, like the lit part of the crescent or gibbous moon.
disc (CircleF)Outer disc.
angle (float)Angle (in degrees, clockwise).
width (float)Maximum width between outer and inner arc.

PainterDelegate

#
public Action<Context, Rectangle> PainterDelegate()
Gets a painting delegate for this builder.

Polyline

#
public void Polyline(params double[] coordinates)
Add a polyline to this icon.
coordinates (params double[])

Polyline

#
public void Polyline(params PointF[] vertices)
Add a polyline to this icon.
vertices (params PointF[])

Polyline

#
public void Polyline(Run polyline)
Add a polyline shape to this icon.
polyline (Run)

State

#
public void State(IconState state)
Add an icon state.
state (IconState)State to add.

State

#
public void State(string name)
Add an icon state with a unit domain initialised to one.
name (string)Name of state to add.

Text

#
public void Text(string text, double x, double y, double size)
Add regular text to this icon.
text (string)Text to display.
x (double)Centre x-coordinate.
y (double)Centre y-coordinate.
size (double)Height of text as a factor of icon height.

TextBold

#
public void TextBold(string text, double x, double y, double size)
Add bold text to this icon.
text (string)Text to display.
x (double)Centre x-coordinate.
y (double)Centre y-coordinate.
size (double)Height of text as a factor of icon height.

TextItalic

#
public void TextItalic(string text, double x, double y, double size)
Add italic text to this icon.
text (string)Text to display.
x (double)Centre x-coordinate.
y (double)Centre y-coordinate.
size (double)Height of text as a factor of icon height.

WithEdge

#
public IDisposable WithEdge(Color colour, float thickness)
Set the current edge state and returns a disposable object for using blocks.
colour (Color)Edge colour.
thickness (float)Edge thickness.
Disposable state.

WithEdge

#
public IDisposable WithEdge(Edge edge)
Set the current edge state and returns a disposable object for using blocks.
edge (Edge)Edge to set.
Disposable state.

WithEdge

#
public IDisposable WithEdge(float thickness)
Set the current edge state and returns a disposable object for using blocks.
thickness (float)Thickness of edge.
Disposable state.

WithEdge

#
public IDisposable WithEdge(Kel colour, Nem thickness)
Set the current edge state and returns a disposable object for using blocks.
colour (Kel)Edge colour.
thickness (Nem)Edge thickness.
Disposable state.

WithFill

#
public IDisposable WithFill(Color colour)
Set the current fill state and returns a disposable object for using blocks.
colour (Color)Fill colour to set.
Disposable state.

WithFill

#
public IDisposable WithFill(Fill fill)
Set the current fill state and returns a disposable object for using blocks.
fill (Fill)Fill to set.
Disposable state.

WithFill

#
public IDisposable WithFill(Kel colour)
Set the current fill state and returns a disposable object for using blocks.
colour (Kel)Fill colour to set.
Disposable state.

WithOrder

#
public IDisposable WithOrder(FillEdgeOrder order)
Set the current draw order and returns a disposable object for using blocks.
order (FillEdgeOrder)Order to set.
Disposable state.

WithRank

#
public IDisposable WithRank(int rank)
Set the current category and returns a disposable object for using blocks.
rank (int)Category to set.
Disposable state.