Grasshopper API
GH_CanvasGetGraphicsObject Method |
Gets a graphics object for this control. You are not allowed to draw with this object,
use it only for visibility testing and such. If you're inside a canvas update, use the Graphics() property instead.
You must dispose of the Graphics object returned by this method or resources will be leaked.
Namespace: Grasshopper.GUI.Canvas
Assembly: Grasshopper (in Grasshopper.dll)

public Graphics GetGraphicsObject( bool setupDisplayTransform )
Public Function GetGraphicsObject ( setupDisplayTransform As Boolean ) As Graphics
Parameters
- setupDisplayTransform
- Type: SystemBoolean
If true, the display transform will be added to the graphics object.
Return Value
Type: GraphicsA non-drawing Graphics object on success or null on failure..
