GH_GraphicsUtil.RenderCenteredIcon Method (Graphics, RectangleF, Image, Double)

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
)
Public Shared Sub RenderCenteredIcon ( 
	g As Graphics,
	frame As RectangleF,
	icon As Image,
	alpha As Double
)

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