Click or drag to resize

GH_GraphicsUtilRenderCenteredIcon Method (Graphics, RectangleF, Image, Double)

Draw an icon centered in a frame. This code is not zoom-aware, but it will perform consistent rounding (to avoid pixel-jitter when moving the frame across the screen). Icon will not be clipped to the frame.

Namespace:  Grasshopper.GUI
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
public static void RenderCenteredIcon(
	Graphics g,
	RectangleF frame,
	Image icon,
	double alpha
)

Parameters

g
Type: System.DrawingGraphics
Graphics object to render with.
frame
Type: System.DrawingRectangleF
Frame to center icon in.
icon
Type: System.DrawingImage
Icon to render
alpha
Type: SystemDouble
Transparency factor.
See Also