GH_CapsuleRenderEngine

References
Provides basic Render methods for capsule display. You typically don't need this class, just use the Render() overloads on GH_Capsule directly.

Methods

CreateHighlightBar

#
Static (Shared in VB) method for creating Grasshopper Capsule highlight fills.
public static GraphicsPath CreateHighlightBar(
Rectangle
rec,
Rectangle for entire fill.
R0,
Radius of upper left corner.
R1,
Radius of upper right corner.
size,
Highlight fill height.
jaggedLeft,
jaggedRight
)
Graphics path that describes the highlight fill shape.

CreateHighlightBar

#
Static (Shared in VB) method for creating Grasshopper Capsule highlight fills.
public static GraphicsPath CreateHighlightBar(
Rectangle
rec,
Rectangle for entire fill.
R0,
Radius of upper left corner.
R1,
Radius of upper right corner.
size
Highlight fill height.
)
Graphics path that describes the highlight fill shape.

CreateHighlightBar

#
Static (Shared in VB) method for creating Grasshopper Capsule highlight fills.
public static GraphicsPath CreateHighlightBar(
Rectangle
rec,
Rectangle for entire fill.
radius,
Corner radius.
size,
Highlight fill height.
jaggedLeft,
jaggedRight
)
Graphics path that describes the highlight fill shape.

CreateHighlightBar

#
Static (Shared in VB) method for creating Grasshopper Capsule highlight fills.
public static GraphicsPath CreateHighlightBar(
Rectangle
rec,
Rectangle for entire fill.
radius,
Corner radius.
size
Highlight fill height.
)
Graphics path that describes the highlight fill shape.

CreateJaggedRectangle

#
Static (Shared in VB) method for creating rectangles with rounded corners.
public static GraphicsPath CreateJaggedRectangle(
rec,
Rectangle to fillet. Rectangles smaller than 3 pixels wide/high will be grown.
R0,
Radius of upper left corner. Zero or negative values omit fillets.
R1,
Radius of upper right corner. Zero or negative values omit fillets.
R2,
Radius of lower right corner. Zero or negative values omit fillets.
R3,
Radius of lower left corner. Zero or negative values omit fillets.
jaggedLeft,
If true, the left edge of the rectangle will be jagged and R0 and R3 will be ignored.
jaggedRight
If true, the right edge of the rectangle will be jagged and R1 and R2 will be ignored.
)
Graphics path that describes the rounded rectangle.

CreateRoundedRectangle

#
Static (Shared in VB) method for creating rectangles with rounded corners.
public static GraphicsPath CreateRoundedRectangle(
Rectangle
rec,
Rectangle to fillet. Rectangles smaller than 3 pixels wide/high will be grown.
R0,
Radius of upper left corner. Zero or negative values omit fillets.
R1,
Radius of upper right corner. Zero or negative values omit fillets.
R2,
Radius of lower right corner. Zero or negative values omit fillets.
R3
Radius of lower left corner. Zero or negative values omit fillets.
)
Graphics path that describes the rounded rectangle.

CreateRoundedRectangle

#
Static (Shared in VB) method for creating rectangles with rounded corners.
public static GraphicsPath CreateRoundedRectangle(
Rectangle
rec,
Rectangle to fillet. Rectangles smaller than 3 pixels wide/high will be grown.
radius
Radius of corner fillets.
)
Graphics path that describes the rounded rectangle.

CreateRoundedRectangle

#
Static (Shared in VB) method for creating rectangles with rounded corners.
public static GraphicsPath CreateRoundedRectangle(
rec,
Rectangle to fillet. Rectangles smaller than 3 pixels wide/high will be grown.
R0,
Radius of upper left corner. Zero or negative values omit fillets.
R1,
Radius of upper right corner. Zero or negative values omit fillets.
R2,
Radius of lower right corner. Zero or negative values omit fillets.
R3
Radius of lower left corner. Zero or negative values omit fillets.
)
Graphics path that describes the rounded rectangle.

CreateRoundedRectangle

#
Static (Shared in VB) method for creating rectangles with rounded corners.
public static GraphicsPath CreateRoundedRectangle(
rec,
Rectangle to fillet. Rectangles smaller than 3 pixels wide/high will be grown.
radius
Radius of corner fillets.
)
Graphics path that describes the rounded rectangle.

GetImpliedPalette

#
Static (Shared in VB) method for solving which palette is the default given a specific object's properties. Default palettes are either GH_Palette.Normal, GH_Palette.Warning or GH_Palette.Error depending on the objects' runtime message level.
public static GH_Palette GetImpliedPalette(
obj
Object to evaluate.
)
The default palette.

GetImpliedStyle

#
Static (Shared in VB) method for solving which palette style is implied by the properties.
public static GH_PaletteStyle GetImpliedStyle(
palette,
Palette hint.
selected,
Specifies whether the selected flavour of a palette needs to be returned.
locked,
If True, the returned palette style is always Locked.
hidden
If True, the returned palette style is always Hidden.
)

GetImpliedStyle

#
Static (Shared in VB) method for solving which palette style is implied by the properties.
public static GH_PaletteStyle GetImpliedStyle(
palette,
Palette hint.
attributes
Attributes to parse for style details.
)

GetPaletteStyle

#
[EditorBrowsable(EditorBrowsableState.Never)] public static GH_PaletteStyle GetPaletteStyle(
palette,
selected,
locked,
hidden
)
obsoletethis method has been replaced by GetImpliedStyle

GetPaletteStyle

#
[EditorBrowsable(EditorBrowsableState.Never)] public static GH_PaletteStyle GetPaletteStyle(
palette,
attributes
)
obsoletethis method has been replaced by GetImpliedStyle

RenderAlphaFill

#
Render a standard transparancy background hatch. This is only needed when the capsule background colour is not fully opaque. This is usually the second stage in a capsule rendering, right after the Grips are drawn.
public void RenderAlphaFill()

RenderBackground

#
Render a default capsule background fill. This is usually the third stage in a capsule rendering.
public void RenderBackground(
G,
Graphics object to draw with.
zoom,
Zoom of graphics object.
style
Final style to draw with.
)

RenderBackground_Alternative

#
Render a custom capsule background fill. This is usually the third stage in a capsule rendering.
public void RenderBackground_Alternative(
G,
Graphics object to draw with.
Color
colourOverride,
Custom background colour.
drawAlphaGrid
If true, and the background colour is not opaque, an alpha grid will be drawn as well.
)

RenderBoundaryDots

#
Render a collection of boundary dots along the top edge of the capsule.
public void RenderBoundaryDots(
G,
count,
Number of dots to render.
style
)

RenderGrips

#
Render all the grips associates with the capsule. Grips are not drawn if the zoom level is less than 50%. This is usually the first stage in a Capsule rendering.
public void RenderGrips()

RenderGrips_Alternative

#
Render all the grips associates with the capsule as semi-circles. This is needed if the capsule background is not fully opaque. Grips are not drawn if the zoom level is less than 50%. This is usually the first stage in a Capsule rendering.
public void RenderGrips_Alternative()

RenderHighlight

#
Render a highlight bar. This is highly zoom-dependant. Highlight rendering is usually the fourth stage in a Capsule Rendering, after the background but prior to the edges.
public void RenderHighlight()

RenderIcon

#
Render an image icon centered into the box. If the content box has been defined the icon will be centered there, otherwise the outline box will be used.
public void RenderIcon(
G,
Graphics surface to draw onto.
icon,
Icon to draw.
offsetX = 0,
Additional x-offset (in original pixel units).
offsetY = 0
Additional y-offset (in original pixel units).
)

RenderIcon

#
Render an image icon centered into the box. If the content box has been defined the icon will be centered there, otherwise the outline box will be used.
public void RenderIcon(
G,
Graphics surface to draw onto.
icon,
Icon to draw.
box,
Box override.
offsetX = 0,
Additional x-offset (in original pixel units).
offsetY = 0
Additional y-offset (in original pixel units).
)

RenderInputGrip

#
Static (Shared in VB) method to render a default input grip.
public static void RenderInputGrip(
G,
Graphics objects to draw with.
zoom,
Zoom level of graphics surface.
PointF
loc,
Location of grip.
full
If true, a complete circular grip will be draw. If false, a semi-circular grip will be drawn.
)

RenderMessage

#
Render a text message underneath the capsule.
public Rectangle RenderMessage(
G,
Graphics object to draw with.
message,
Message to draw.
style
Style to use.
)

RenderOutlines

#
Render default capsule outlines. If the zoom factor is less than 50% the inner outline is not drawn. This is usually the fifth stage in a Capsule rendering.
public void RenderOutlines(
G,
Graphics object to draw with.
zoom,
Zoom level of graphics object.
style
Palette style that defines edge properties.
)

RenderOutputGrip

#
Static (Shared in VB) method to render a default output grip.
public static void RenderOutputGrip(
G,
Graphics objects to draw with.
zoom,
Zoom level of graphics surface.
PointF
loc,
Location of grip.
full
If true, a complete circular grip will be draw. If false, a semi-circular grip will be drawn.
)

RenderText

#
Render the capsule text. This is usually the sixth and final stage in a capsule rendering.
public void RenderText(
G,
Graphics object to draw with.
Color
colour
Colour of text.
)