Click or drag to resize

GH_Capsule Class

Class used to draw standard Grasshopper interface boxes.
Inheritance Hierarchy
SystemObject
  Grasshopper.GUI.CanvasGH_Capsule

Namespace:  Grasshopper.GUI.Canvas
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
public class GH_Capsule : IDisposable

The GH_Capsule type exposes the following members.

Properties
  NameDescription
Public propertyBox
Gets the outline box for this Capsule.
Public propertyBox_Content
Gets the content box for this Capsule. Text and icons are drawn inside this box.
Public propertyFont
Gets or sets the Font to use for text rendering.
Public propertyHighlight
Gets the highlight size for this Capsule. Zero or negative means there is no highlight.
Public propertyHighlightShape
Gets the graphics path that describes the highlight bar shape of the capsule.
Public propertyInputGrips
Gets the list of locally defined input grip locations.
Public propertyJaggedLeft
Gets whether the left edge of this capsule is jagged.
Public propertyJaggedRight
Gets whether the right edge of this capsule is jagged.
Public propertyMaxRadius
Gets the largest radius defined for this capsule.
Public propertyOutlineShape
Gets the graphics path that describes the outer edge of the capsule.
Public propertyOutputGrips
Gets the list of locally defined output grip locations.
Public propertyPalette
Gets or sets the palette for this Capsule.
Public propertyRadius
Gets the radius of the rounded corners of this Capsule.
Public propertyRenderEngine
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.
Public propertyText
Gets or sets the text to render in the content box.
Public propertyTextOrientation
Gets or sets the orientation of the text within the content box.
Top
Methods
  NameDescription
Public methodAddInputGrip(Point)
Add an input grip to this UI Box.
Public methodAddInputGrip(PointF)
Add an input grip to this UI Box.
Public methodAddInputGrip(Single)
Add an input grip to this UI Box. This is the recommended overload.
Public methodAddInputGrip(Single, Single)
Add an input grip to this UI Box.
Public methodAddOutputGrip(Point)
Add an output grip to this UI Box.
Public methodAddOutputGrip(PointF)
Add an output grip to this UI Box.
Public methodAddOutputGrip(Single)
Add an output grip to this UI Box. This is the recommended overload.
Public methodAddOutputGrip(Single, Single)
Add an output grip to this UI Box.
Public methodContains
Test a point for capsule containment.
Public methodStatic memberCreateCapsule(Rectangle, GH_Palette)
Create a new blank capsule with default radius and highlight dimensions.
Public methodStatic memberCreateCapsule(RectangleF, GH_Palette)
Create a new blank capsule with default radius and highlight dimensions.
Public methodStatic memberCreateCapsule(Rectangle, GH_Palette, Int32, Int32)
Create a new blank capsule.
Public methodStatic memberCreateCapsule(Rectangle, GH_Palette, Int32, Int32)
Create a new blank capsule.
Public methodStatic memberCreateCapsule(RectangleF, GH_Palette, Int32, Int32)
Create a new blank capsule.
Public methodStatic memberCreateCapsule(RectangleF, GH_Palette, Int32, Int32)
Create a new blank capsule.
Public methodStatic memberCreateTextCapsule(Rectangle, Rectangle, GH_Palette, String)
Create a new capsule with content text.
Public methodStatic memberCreateTextCapsule(RectangleF, RectangleF, GH_Palette, String)
Create a new capsule with content text.
Public methodStatic memberCreateTextCapsule(Rectangle, Rectangle, GH_Palette, String, Font)
Create a new capsule with content text.
Public methodStatic memberCreateTextCapsule(RectangleF, RectangleF, GH_Palette, String, Font)
Create a new capsule with content text.
Public methodStatic memberCreateTextCapsule(Rectangle, Rectangle, GH_Palette, String, Font, GH_Orientation)
Create a new capsule with content text.
Public methodStatic memberCreateTextCapsule(Rectangle, Rectangle, GH_Palette, String, Int32, Int32)
Create a new capsule with content text.
Public methodStatic memberCreateTextCapsule(Rectangle, Rectangle, GH_Palette, String, Int32, Int32)
Create a new capsule with content text.
Public methodStatic memberCreateTextCapsule(RectangleF, RectangleF, GH_Palette, String, Font, GH_Orientation)
Create a new capsule with content text.
Public methodStatic memberCreateTextCapsule(RectangleF, RectangleF, GH_Palette, String, Int32, Int32)
Create a new capsule with content text.
Public methodStatic memberCreateTextCapsule(RectangleF, RectangleF, GH_Palette, String, Int32, Int32)
Create a new capsule with content text.
Public methodStatic memberCreateTextCapsule(Rectangle, Rectangle, GH_Palette, String, Font, Int32, Int32)
Create a new capsule with content text.
Public methodStatic memberCreateTextCapsule(Rectangle, Rectangle, GH_Palette, String, Font, Int32, Int32)
Create a new capsule with content text.
Public methodStatic memberCreateTextCapsule(RectangleF, RectangleF, GH_Palette, String, Font, Int32, Int32)
Create a new capsule with content text.
Public methodStatic memberCreateTextCapsule(RectangleF, RectangleF, GH_Palette, String, Font, Int32, Int32)
Create a new capsule with content text.
Public methodStatic memberCreateTextCapsule(Rectangle, Rectangle, GH_Palette, String, Font, GH_Orientation, Int32, Int32)
Create a new capsule with content text.
Public methodStatic memberCreateTextCapsule(Rectangle, Rectangle, GH_Palette, String, Font, GH_Orientation, Int32, Int32)
Create a new capsule with content text.
Public methodStatic memberCreateTextCapsule(RectangleF, RectangleF, GH_Palette, String, Font, GH_Orientation, Int32, Int32)
Create a new capsule with content text.
Public methodStatic memberCreateTextCapsule(RectangleF, RectangleF, GH_Palette, String, Font, GH_Orientation, Int32, Int32)
Create a new capsule with content text.
Public methodDispose
Releases all resources used by the GH_Capsule
Protected methodDispose(Boolean)
Releases the unmanaged resources used by the GH_Capsule and optionally releases the managed resources
Public methodRender(Graphics, GH_PaletteStyle)
Have this capsule draw itself onto a Graphics surface with a custom Style override.
Public methodRender(Graphics, Color)
Have this capsule draw itself onto a Graphics surface with a custom colour override.
Public methodRender(Graphics, Image, GH_PaletteStyle)
Have this capsule draw itself onto a Graphics surface with a custom Style override.
Public methodRender(Graphics, Image, Color)
Have this capsule draw itself onto a Graphics surface with a custom colour override.
Public methodRender(Graphics, Boolean, Boolean, Boolean)
Render the capsule onto a graphics context.
Public methodRender(Graphics, Image, Boolean, Boolean, Boolean)
Render the capsule onto a graphics context.
Public methodSetJaggedEdges
Assign left and right jagged edges.
Top
Fields
  NameDescription
Public fieldStatic memberDefaultHighlight
The default size (in pixel units) of the highlight bar.
Public fieldStatic memberDefaultRadius
The default radius (in pixel units) of the rounded corners.
Top
See Also