GH_CapsuleRenderEngine
ReferencesProvides 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.
Returns: 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.
Returns: 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
Returns: Graphics path that describes the highlight fill shape.
CreateHighlightBar
#Static (Shared in VB) method for creating Grasshopper Capsule highlight fills.
Returns: 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.
Returns: 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.
Returns: 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.
Returns: 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.
Returns: 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.
Returns: 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.
Returns: 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.
GetPaletteStyle
#obsoletethis method has been replaced by GetImpliedStyle
GetPaletteStyle
#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.
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.
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.
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.
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.
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.
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.
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.