# GH_GraphicsUtil class

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

```cs
public sealed class GH_GraphicsUtil
```

Utility class with static (Shared) functions that help with colour, shape and text rendering.

## Properties

- [UiScale](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/uiscale.md): (static) Gets the screen-scaling factor for the entire system. Use the UiAdjust methods in the Grasshopper top level namespace (Global_Proc module) to modify integer and single values.

## Methods

- [AppendArc](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/appendarc.md): (2 overloads, static) Append an arc segment to a GraphicsPath. If the arc cannot be solved, a linear segment is appended instead.
- [BlendColour](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/blendcolour.md): (2 overloads, static) Overlays two colours.
- [BlendInteger](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/blendinteger.md): (static) Calculates a linear blend between two extremes. Although the inputs are unlimited integers, the output is an integer in the byte range (0-255).
- [BoxClosestArcPoint](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/boxclosestarcpoint.md): (static) Find the closest point on or in a box given a test point. Arc extension is implied.
- [BoxClosestPoint](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/boxclosestpoint.md): (2 overloads, static) Find the closest point on or in a box given a test point.
- [BoxFurthestPoint](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/boxfurthestpoint.md): (2 overloads, static) Find the furthest point on or in a box given a test point.
- [BoxViewCone](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/boxviewcone.md): (static) Computes the graphicspath that represents the viewcone for a point and a rectangle. If the rectangle contains the point, null is returned.
- [ColourARGB](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/colourargb.md): (3 overloads, static) Create a colour from floating ARGB channels (0.0~1.0). Channels are clipped to valid ranges.
- [CreateColourIcon](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/createcolouricon.md): (static) Create a colour swatch icon.
- [DentHorizontal](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/denthorizontal.md): (2 overloads, static) Draws a horizontal dent. A horizontal dent had dark lines along the top and bottom edges.
- [DentVertical](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/dentvertical.md): (2 overloads, static) Draws a vertical dent. A vertical dent had dark lines along the left and right edges.
- [Distance](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/distance.md): (static) Compute the distance between two points.
- [DistanceS](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/distances.md): (static) Compute the squared distance between two points.
- [EtchFadingHorizontal](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/etchfadinghorizontal.md): (static) Draw an etched line with fading on the extremes.
- [EtchFadingVertical](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/etchfadingvertical.md): (static) Draw an etched line with fading on the extremes.
- [EtchHorizontal](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/etchhorizontal.md): (2 overloads, static) Draws an etched line segment.
- [EtchVertical](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/etchvertical.md): (2 overloads, static) Draws an etched line segment.
- [FadeColour](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/fadecolour.md): (static) Fade a colour to transparency by linearly blending a parameter between extremes.
- [ForegroundColour](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/foregroundcolour.md): (static) Calculates a suitable foreground color. If the background is lighter than 50%, the foreground will be darker, otherwise the foreground will be lighter.
- [Grid](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/grid.md): (3 overloads, static) Draw a default grid.
- [HighlightBrush](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/highlightbrush.md): (static) Gets a new brush object that can be used to draw the content of hover and focus rectangles. Caller is responsible for disposing the brush.
- [HighlightPen](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/highlightpen.md): (static) Gets a new pen object that can be used to draw the edges of hover and focus rectangles. Caller is responsible for disposing the pen.
- [InvertColour](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/invertcolour.md): (static) Computes the inverted colour. Alpha remains the same.
- [IsPointInEllipse](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/ispointinellipse.md): (static) Test whether a point is inside or outside an ellipse.
- [LimitInteger](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/limitinteger.md): (static) Limits the given integer to the 0~255 range.
- [LimitIntegers](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/limitintegers.md): (static) Limits RGB channels to the 0~255 range,
- [OffsetColour](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/offsetcolour.md): (2 overloads, static) Add a fixed value to all the channels in a colour.
- [RenderBalloonTag](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/renderballoontag.md): (4 overloads, static) Draw a balloon tag in a container.
- [RenderCenteredIcon](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/rendercenteredicon.md): (3 overloads, static) 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.
- [RenderCenteredText](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/rendercenteredtext.md): (static) Render a bit of text centered on a point.
- [RenderColourIcon](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/rendercolouricon.md): (2 overloads, static) Render a colour icon into a graphics context. A colour icon contains a black outer and white inner edge.
- [RenderFadedImage](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/renderfadedimage.md): (2 overloads, static) Render an icon into a rectangle with a specific fading factor.
- [RenderHighlightBox](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/renderhighlightbox.md): (3 overloads, static) Render a typical blueish highlight rectangle
- [RenderIcon](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/rendericon.md): (static) Render an icon into a frame. The icon is positioned in the center and will be drawn at its own size multiplied by the system UiScale, provided it doesn't exceed the frame.
- [RenderObjectOverlay](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/renderobjectoverlay.md): (2 overloads, static) Render all overlay icons for a specific object. Overlays aren't drawn when the zoom is less than 80%
- [RenderRoundBar](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/renderroundbar.md): (static) Render a cylinder shaped object with round caps.
- [RenderTag](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/rendertag.md): (static) Render a text tag into a Graphics surface.
- [RenderUnscaledIcon](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/renderunscaledicon.md): (2 overloads, static, obsolete) Draws an image file at 1:1 scale centered on the given coordinates.
- [RenderVerticalString](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/renderverticalstring.md): (static) Render vertical text (rotated 90 degrees counter-clockwise) within a rectangle.
- [RenderWarningIcon](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/renderwarningicon.md): (static) Render a typical warning icon into a graphics context. A warning icon is an upright yellow triangle.
- [ScaleColour](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/scalecolour.md): (static) Multiply the channels of a colour construct with a fixed factor.
- [ShadowHorizontal](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/shadowhorizontal.md): (3 overloads, static) Draws a horizontal shadow edge.
- [ShadowRectangle](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/shadowrectangle.md): (2 overloads, static) Draws shadow edges on the interior of a rectangle.
- [ShadowVertical](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/shadowvertical.md): (3 overloads, static) Draws a vertical shadow edge.
- [SolveArc](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/solvearc.md): (3 overloads, static) Create a GDI circular arc definition from start-point, end-point and tangent direction.
- [TransparencyMatrix](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-graphicsutil/transparencymatrix.md): (2 overloads, static) Create an image transparency matrix for a specific blending factor.
