Grasshopper API
GH_CapsuleRenderEngineRenderIcon Method (Graphics, Image, RectangleF, Int32, Int32) |
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.
Namespace: Grasshopper.GUI.Canvas
Assembly: Grasshopper (in Grasshopper.dll)

public void RenderIcon( Graphics G, Image icon, RectangleF box, int offsetX = 0, int offsetY = 0 )
Public Sub RenderIcon ( G As Graphics, icon As Image, box As RectangleF, Optional offsetX As Integer = 0, Optional offsetY As Integer = 0 )
Parameters
- G
- Type: System.DrawingGraphics
Graphics surface to draw onto. - icon
- Type: System.DrawingImage
Icon to draw. - box
- Type: System.DrawingRectangleF
Box override. - offsetX (Optional)
- Type: SystemInt32
Additional x-offset (in original pixel units). - offsetY (Optional)
- Type: SystemInt32
Additional y-offset (in original pixel units).
