Properties

Bounds

#
RectangleF Bounds { get; }
Gets the bounds for this fragment (essentially the Pivot + Size).

Description

#
string Description { get; }
Gets the description for this fragment.

Icon

#
Bitmap Icon { get; }
Gets the 24x24 icon for this fragment.

Name

#
string Name { get; }
Gets the name for this fragment.

Pivot

#
PointF Pivot { get; set; }
Gets or sets the insertion point for this fragment.

Size

#
SizeF Size { get; }
Gets the size of this fragment as determined by the most recent Layout.

Methods

Layout

#
bool Layout(Font font)
Performs a complete recursive layout of this fragment and all contained fragments. Note that layout only determines the Size of the fragment, not it's location.
font (Font)Font to use during Layout.
True on success, false on failure.

Position

#
bool Position(PointF location)
Performs a complete recursive positioning of this fragment and all contained fragments. You need to run a Layout pass prior to calling Position to make sure all sizes are up to date.
location (PointF)Base line of position.
True on success, false on failure.

Render

#
void Render(Graphics graphics, Font font, Color colour)
Render this fragment and all contained fragments.
graphics (Graphics)
font (Font)
colour (Color)

ToExpression

#
string ToExpression()
Format the fragment as a partial Grasshopper expression.
The expression equivalent of this fragment.