# GH_Capsule class

Namespace: [Grasshopper.GUI.Canvas](https://developer.rhino3d.com/api/gh1/namespace/grasshopper.gui.canvas.md) · Assembly: [Grasshopper](https://developer.rhino3d.com/api/gh1/assembly/grasshopper.md)

```cs
public class GH_Capsule : IDisposable
```

Class used to draw standard Grasshopper interface boxes.

## Fields

- [DefaultHighlight](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.canvas.gh-capsule/defaulthighlight.md): (static) The default size (in pixel units) of the highlight bar.
- [DefaultRadius](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.canvas.gh-capsule/defaultradius.md): (static) The default radius (in pixel units) of the rounded corners.

## Properties

- [Box](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.canvas.gh-capsule/box.md): Gets the outline box for this Capsule.
- [Box_Content](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.canvas.gh-capsule/box-content.md): Gets the content box for this Capsule. Text and icons are drawn inside this box.
- [Font](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.canvas.gh-capsule/font.md): Gets or sets the Font to use for text rendering.
- [Highlight](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.canvas.gh-capsule/highlight.md): Gets the highlight size for this Capsule. Zero or negative means there is no highlight.
- [HighlightShape](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.canvas.gh-capsule/highlightshape.md): Gets the graphics path that describes the highlight bar shape of the capsule.
- [InputGrips](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.canvas.gh-capsule/inputgrips.md): Gets the list of locally defined input grip locations.
- [JaggedLeft](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.canvas.gh-capsule/jaggedleft.md): Gets whether the left edge of this capsule is jagged.
- [JaggedRight](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.canvas.gh-capsule/jaggedright.md): Gets whether the right edge of this capsule is jagged.
- [MaxRadius](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.canvas.gh-capsule/maxradius.md): Gets the largest radius defined for this capsule.
- [OutlineShape](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.canvas.gh-capsule/outlineshape.md): Gets the graphics path that describes the outer edge of the capsule.
- [OutputGrips](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.canvas.gh-capsule/outputgrips.md): Gets the list of locally defined output grip locations.
- [Palette](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.canvas.gh-capsule/palette.md): Gets or sets the palette for this Capsule.
- [Radius](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.canvas.gh-capsule/radius.md): Gets the radius of the rounded corners of this Capsule.
- [RenderEngine](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.canvas.gh-capsule/renderengine.md): 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.
- [Text](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.canvas.gh-capsule/text.md): Gets or sets the text to render in the content box.
- [TextOrientation](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.canvas.gh-capsule/textorientation.md): Gets or sets the orientation of the text within the content box.

## Methods

- [AddInputGrip](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.canvas.gh-capsule/addinputgrip.md): (4 overloads) Add an input grip to this UI Box.
- [AddOutputGrip](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.canvas.gh-capsule/addoutputgrip.md): (4 overloads) Add an output grip to this UI Box.
- [Contains](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.canvas.gh-capsule/contains.md): Test a point for capsule containment.
- [CreateCapsule](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.canvas.gh-capsule/createcapsule.md): (6 overloads, static) Create a new blank capsule.
- [CreateTextCapsule](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.canvas.gh-capsule/createtextcapsule.md): (18 overloads, static) Create a new capsule with content text.
- [Dispose](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.canvas.gh-capsule/dispose.md): (2 overloads)
- [Render](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.canvas.gh-capsule/render.md): (6 overloads) Render the capsule onto a graphics context.
- [SetJaggedEdges](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.canvas.gh-capsule/setjaggededges.md): Assign left and right jagged edges.
