Fields
Properties
Box_Content
#Gets the content box for this Capsule. Text and icons are drawn inside this box.
public Rectangle Box_Content { get; }
Radius
#Gets the radius of the rounded corners of this Capsule.
Parameters:
| index (int) | Corner index. 0 = upper left 1 = upper right 2 = lower right 3 = lower left |
RenderEngine
#Gets the RenderEngine associated with this capsule. You typically don't need to go this far, just use one of the Render() overloads on GH_Capsule directly.
Remarks: Do not store pointers to the RenderEngine, always call this property anew.
Methods
AddInputGrip
#Add an input grip to this UI Box.
AddOutputGrip
#Add an output grip to this UI Box.
AddOutputGrip
#Add an output grip to this UI Box.
public void AddOutputGrip()
Point
P
Coordinate of grip.
AddOutputGrip
#Add an output grip to this UI Box.
public void AddOutputGrip()
PointF
P
Coordinate of grip.
Contains
#Test a point for capsule containment.
Returns: True if the point is on the interior of the capsule.
CreateCapsule
#Create a new blank capsule.
public static GH_Capsule CreateCapsule()
Rectangle
box,
Box for capsule dimensions. The box will be grown until it is at least 3 pixels wide and high.
palette,
Colour palette to apply.
radius,
Radius of rounded corners. A radius of zero or lower disables corner fillets.
highlight
Height of the highlight bar. A value of zero or lower disables the highlight.
Returns: A new instance of GH_Capsule. Caller is responsible for disposing of the object.
CreateCapsule
#Create a new blank capsule.
public static GH_Capsule CreateCapsule()
Rectangle
box,
Box for capsule dimensions. The box will be grown until it is at least 3 pixels wide and high.
palette,
Colour palette to apply.
int[]
radii,
Radii of rounded corners. This array must contain at least 4 integers. Radii are defined clockwise, starting at the upper left corner.
highlight
Height of the highlight bar. A value of zero or lower disables the highlight.
Returns: A new instance of GH_Capsule. Caller is responsible for disposing of the object.
CreateCapsule
#Create a new blank capsule with default radius and highlight dimensions.
public static GH_Capsule CreateCapsule()
Rectangle
box,
Box for capsule dimensions. The box will be grown until it is at least 3 pixels wide and high.
palette
Colour palette to apply.
Returns: A new instance of GH_Capsule. Caller is responsible for disposing of the object.
CreateCapsule
#Create a new blank capsule.
public static GH_Capsule CreateCapsule()
box,
Box for capsule dimensions. The box will be grown until it is at least 3 pixels wide and high.
palette,
Colour palette to apply.
radius,
Radius of rounded corners. A radius of zero or lower disables corner fillets.
highlight
Height of the highlight bar. A value of zero or lower disables the highlight.
Returns: A new instance of GH_Capsule. Caller is responsible for disposing of the object.
CreateCapsule
#Create a new blank capsule.
public static GH_Capsule CreateCapsule()
box,
Box for capsule dimensions. The box will be grown until it is at least 3 pixels wide and high.
palette,
Colour palette to apply.
int[]
radii,
Radii of rounded corners. This array must contain at least 4 integers. Radii are defined clockwise, starting at the upper left corner.
highlight
Height of the highlight bar. A value of zero or lower disables the highlight.
Returns: A new instance of GH_Capsule. Caller is responsible for disposing of the object.
CreateCapsule
#Create a new blank capsule with default radius and highlight dimensions.
public static GH_Capsule CreateCapsule()
box,
Box for capsule dimensions. The box will be grown until it is at least 3 pixels wide and high.
palette
Colour palette to apply.
Returns: A new instance of GH_Capsule. Caller is responsible for disposing of the object.
CreateTextCapsule
#Create a new capsule with content text.
public static GH_Capsule CreateTextCapsule()
Rectangle
box,
Box for capsule dimensions. The box will be grown until it is at least 3 pixels wide and high.
Rectangle
textbox,
Box into which the text will be drawn.
palette,
Colour palette to apply.
text,
Text to display inside the capsule.
Font
font,
Font to draw text with.
orientation,
Orientation of text within box.
radius,
Radius of rounded corners. A radius of zero or lower disables corner fillets.
highlight
Height of the highlight bar. A value of zero or lower disables the highlight.
Returns: A new instance of GH_Capsule. Caller is responsible for disposing of the object.
CreateTextCapsule
#Create a new capsule with content text.
public static GH_Capsule CreateTextCapsule()
Rectangle
box,
Box for capsule dimensions. The box will be grown until it is at least 3 pixels wide and high.
Rectangle
textbox,
Box into which the text will be drawn.
palette,
Colour palette to apply.
text,
Text to display inside the capsule.
Font
font,
Font to draw text with.
orientation,
Orientation of text within box.
int[]
radii,
Radii of rounded corners. This array must contain at least 4 integers. Radii are defined clockwise, starting at the upper left corner.
highlight
Height of the highlight bar. A value of zero or lower disables the highlight.
Returns: A new instance of GH_Capsule. Caller is responsible for disposing of the object.
CreateTextCapsule
#Create a new capsule with content text.
public static GH_Capsule CreateTextCapsule()
Rectangle
box,
Box for capsule dimensions. The box will be grown until it is at least 3 pixels wide and high.
Rectangle
textbox,
Box into which the text will be drawn.
palette,
Colour palette to apply.
text,
Text to display inside the capsule.
Font
font,
Font to draw text with.
orientation
Orientation of text within box.
Returns: A new instance of GH_Capsule. Caller is responsible for disposing of the object.
CreateTextCapsule
#Create a new capsule with content text.
public static GH_Capsule CreateTextCapsule()
Rectangle
box,
Box for capsule dimensions. The box will be grown until it is at least 3 pixels wide and high.
Rectangle
textbox,
Box into which the text will be drawn.
palette,
Colour palette to apply.
text,
Text to display inside the capsule.
Font
font,
Font to draw text with.
radius,
Radius of rounded corners. A radius of zero or lower disables corner fillets.
highlight
Height of the highlight bar. A value of zero or lower disables the highlight.
Returns: A new instance of GH_Capsule. Caller is responsible for disposing of the object.
CreateTextCapsule
#Create a new capsule with content text.
public static GH_Capsule CreateTextCapsule()
Rectangle
box,
Box for capsule dimensions. The box will be grown until it is at least 3 pixels wide and high.
Rectangle
textbox,
Box into which the text will be drawn.
palette,
Colour palette to apply.
text,
Text to display inside the capsule.
Font
font,
Font to draw text with.
int[]
radii,
Radii of rounded corners. This array must contain at least 4 integers. Radii are defined clockwise, starting at the upper left corner.
highlight
Height of the highlight bar. A value of zero or lower disables the highlight.
Returns: A new instance of GH_Capsule. Caller is responsible for disposing of the object.
CreateTextCapsule
#Create a new capsule with content text.
public static GH_Capsule CreateTextCapsule()
Rectangle
box,
Box for capsule dimensions. The box will be grown until it is at least 3 pixels wide and high.
Rectangle
textbox,
Box into which the text will be drawn.
palette,
Colour palette to apply.
text,
Text to display inside the capsule.
Font
font
Font to draw text with.
Returns: A new instance of GH_Capsule. Caller is responsible for disposing of the object.
CreateTextCapsule
#Create a new capsule with content text.
public static GH_Capsule CreateTextCapsule()
Rectangle
box,
Box for capsule dimensions. The box will be grown until it is at least 3 pixels wide and high.
Rectangle
textbox,
Box into which the text will be drawn.
palette,
Colour palette to apply.
text,
Text to display inside the capsule.
radius,
Radius of rounded corners. A radius of zero or lower disables corner fillets.
highlight
Height of the highlight bar. A value of zero or lower disables the highlight.
Returns: A new instance of GH_Capsule. Caller is responsible for disposing of the object.
CreateTextCapsule
#Create a new capsule with content text.
public static GH_Capsule CreateTextCapsule()
Rectangle
box,
Box for capsule dimensions. The box will be grown until it is at least 3 pixels wide and high.
Rectangle
textbox,
Box into which the text will be drawn.
palette,
Colour palette to apply.
text,
Text to display inside the capsule.
int[]
radii,
Radii of rounded corners. This array must contain at least 4 integers. Radii are defined clockwise, starting at the upper left corner.
highlight
Height of the highlight bar. A value of zero or lower disables the highlight.
Returns: A new instance of GH_Capsule. Caller is responsible for disposing of the object.
CreateTextCapsule
#Create a new capsule with content text.
public static GH_Capsule CreateTextCapsule()
Rectangle
box,
Box for capsule dimensions. The box will be grown until it is at least 3 pixels wide and high.
Rectangle
textbox,
Box into which the text will be drawn.
palette,
Colour palette to apply.
text
Text to display inside the capsule.
Returns: A new instance of GH_Capsule. Caller is responsible for disposing of the object.
CreateTextCapsule
#Create a new capsule with content text.
public static GH_Capsule CreateTextCapsule()
box,
Box for capsule dimensions. The box will be grown until it is at least 3 pixels wide and high.
textbox,
Box into which the text will be drawn.
palette,
Colour palette to apply.
text,
Text to display inside the capsule.
Font
font,
Font to draw text with.
orientation,
Orientation of text within box.
radius,
Radius of rounded corners. A radius of zero or lower disables corner fillets.
highlight
Height of the highlight bar. A value of zero or lower disables the highlight.
Returns: A new instance of GH_Capsule. Caller is responsible for disposing of the object.
CreateTextCapsule
#Create a new capsule with content text.
public static GH_Capsule CreateTextCapsule()
box,
Box for capsule dimensions. The box will be grown until it is at least 3 pixels wide and high.
textbox,
Box into which the text will be drawn.
palette,
Colour palette to apply.
text,
Text to display inside the capsule.
Font
font,
Font to draw text with.
orientation,
Orientation of text within box.
int[]
radii,
Radii of rounded corners. This array must contain at least 4 integers. Radii are defined clockwise, starting at the upper left corner.
highlight
Height of the highlight bar. A value of zero or lower disables the highlight.
Returns: A new instance of GH_Capsule. Caller is responsible for disposing of the object.
CreateTextCapsule
#Create a new capsule with content text.
public static GH_Capsule CreateTextCapsule()
box,
Box for capsule dimensions. The box will be grown until it is at least 3 pixels wide and high.
textbox,
Box into which the text will be drawn.
palette,
Colour palette to apply.
text,
Text to display inside the capsule.
Font
font,
Font to draw text with.
orientation
Orientation of text within box.
Returns: A new instance of GH_Capsule. Caller is responsible for disposing of the object.
CreateTextCapsule
#Create a new capsule with content text.
public static GH_Capsule CreateTextCapsule()
box,
Box for capsule dimensions. The box will be grown until it is at least 3 pixels wide and high.
textbox,
Box into which the text will be drawn.
palette,
Colour palette to apply.
text,
Text to display inside the capsule.
Font
font,
Font to draw text with.
radius,
Radius of rounded corners. A radius of zero or lower disables corner fillets.
highlight
Height of the highlight bar. A value of zero or lower disables the highlight.
Returns: A new instance of GH_Capsule. Caller is responsible for disposing of the object.
CreateTextCapsule
#Create a new capsule with content text.
public static GH_Capsule CreateTextCapsule()
box,
Box for capsule dimensions. The box will be grown until it is at least 3 pixels wide and high.
textbox,
Box into which the text will be drawn.
palette,
Colour palette to apply.
text,
Text to display inside the capsule.
Font
font,
Font to draw text with.
int[]
radii,
Radii of rounded corners. This array must contain at least 4 integers. Radii are defined clockwise, starting at the upper left corner.
highlight
Height of the highlight bar. A value of zero or lower disables the highlight.
Returns: A new instance of GH_Capsule. Caller is responsible for disposing of the object.
CreateTextCapsule
#Create a new capsule with content text.
public static GH_Capsule CreateTextCapsule()
box,
Box for capsule dimensions. The box will be grown until it is at least 3 pixels wide and high.
textbox,
Box into which the text will be drawn.
palette,
Colour palette to apply.
text,
Text to display inside the capsule.
Font
font
Font to draw text with.
Returns: A new instance of GH_Capsule. Caller is responsible for disposing of the object.
CreateTextCapsule
#Create a new capsule with content text.
public static GH_Capsule CreateTextCapsule()
box,
Box for capsule dimensions. The box will be grown until it is at least 3 pixels wide and high.
textbox,
Box into which the text will be drawn.
palette,
Colour palette to apply.
text,
Text to display inside the capsule.
radius,
Radius of rounded corners. A radius of zero or lower disables corner fillets.
highlight
Height of the highlight bar. A value of zero or lower disables the highlight.
Returns: A new instance of GH_Capsule. Caller is responsible for disposing of the object.
CreateTextCapsule
#Create a new capsule with content text.
public static GH_Capsule CreateTextCapsule()
box,
Box for capsule dimensions. The box will be grown until it is at least 3 pixels wide and high.
textbox,
Box into which the text will be drawn.
palette,
Colour palette to apply.
text,
Text to display inside the capsule.
int[]
radii,
Radii of rounded corners. This array must contain at least 4 integers. Radii are defined clockwise, starting at the upper left corner.
highlight
Height of the highlight bar. A value of zero or lower disables the highlight.
Returns: A new instance of GH_Capsule. Caller is responsible for disposing of the object.
CreateTextCapsule
#Create a new capsule with content text.
public static GH_Capsule CreateTextCapsule()
box,
Box for capsule dimensions. The box will be grown until it is at least 3 pixels wide and high.
textbox,
Box into which the text will be drawn.
palette,
Colour palette to apply.
text
Text to display inside the capsule.
Returns: A new instance of GH_Capsule. Caller is responsible for disposing of the object.
Dispose
#public void Dispose()
Render
#Render the capsule onto a graphics context.
public void Render()
G,
Graphics object to draw with. Zoom factor is implied by the G.Transform property.
selected,
If true, the capsule will be drawn with selected colours.
locked,
If True, the capcule will be drawn in Locked style.
hidden
If True, the capsule will be drawn in Hidden style.
Render
#Have this capsule draw itself onto a Graphics surface with a custom colour override.
public void Render()
G,
Graphics object to draw with. Zoom factor is implied by the G.Transform property.
Color
colour
Base colour for the capsule. Other colours will be derived from the base colour. If you want full control over every colour involved, then use the overload that allows you to supply a custom Style instead.
Render
#Have this capsule draw itself onto a Graphics surface with a custom Style override.
public void Render()
G,
Graphics object to draw with. Zoom factor is implied by the G.Transform property.
style
Style to draw capsule with.
Render
#Render the capsule onto a graphics context.
public void Render()
G,
Graphics object to draw with. Zoom factor is implied by the G.Transform property.
icon,
Icon to render in center of content/bounding box.
selected,
If true, the capsule will be drawn with selected colours.
locked,
If True, the capcule will be drawn in Locked style.
hidden
If True, the capsule will be drawn in Hidden style.
Render
#Have this capsule draw itself onto a Graphics surface with a custom colour override.
public void Render()
G,
Graphics object to draw with. Zoom factor is implied by the G.Transform property.
icon,
Icon to render in center of content/bounding box.
Color
colour
Base colour for the capsule. Other colours will be derived from the base colour. If you want full control over every colour involved, then use the overload that allows you to supply a custom Style instead.
Render
#Have this capsule draw itself onto a Graphics surface with a custom Style override.
public void Render()
G,
Graphics object to draw with. Zoom factor is implied by the G.Transform property.
icon,
Icon to render in center of content/bounding box.
style
Style to draw capsule with.