# DrawingUtilities class

Namespace: [Rhino.UI](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.ui.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
public static class DrawingUtilities
```

RhinoCommon Drawing Utilities

## Methods

- [BitmapFromIconResource](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.drawingutilities/bitmapfromiconresource.md): (2 overloads, static) Load a Icon from an embedded resource and convert it to a bitmap of the specified size. Will look for a icon image that is greater than or equal to the requested size, if all images are less than the requested size the largest image will be used.
- [BitmapFromSvg](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.drawingutilities/bitmapfromsvg.md): (2 overloads, static) Create bitmap of a given size from an svg string
- [CreateCurvePreviewGeometry](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.drawingutilities/createcurvepreviewgeometry.md): (static) Create a series of closed polyline loops representing a curve and a linetype combination.
- [CreateLinetypePreviewGeometryEx](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.drawingutilities/createlinetypepreviewgeometryex.md): (static) Preview geometry for a linetype on a curve, by channel, mirroring the viewport renderer. kind 0 returns the dash silhouette polygons with the line cleared under each shape (these are meant to be filled); kind 1 returns curve shape outlines (meant to be stroked); kind 2 returns text and surface shape outlines (meant to be filled with an even-odd rule).
- [CreateMeshPreviewImage](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.drawingutilities/createmeshpreviewimage.md): (3 overloads, static) Creates a preview image of one or more meshes.
- [DarkModeConvertPixel](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.drawingutilities/darkmodeconvertpixel.md): (static) Attempt to adjust pixels to an image that works for dark mode
- [DarkModeConvertPixels](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.drawingutilities/darkmodeconvertpixels.md): (static) Attempt to adjust pixels to an image that works for dark mode
- [IconFromResource](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.drawingutilities/iconfromresource.md): (2 overloads, static) Load a Icon from an embedded resource.
- [ImageFromResource](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.drawingutilities/imagefromresource.md): (static) Load a Image from an embedded resource.
- [LoadBitmapWithScaleDown](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.drawingutilities/loadbitmapwithscaledown.md): (static) Loads an icon from an embedded resource and converts it to a bitmap. If the icon is not a standard size, this function scales down a larger image.
- [LoadIconWithScaleDown](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.drawingutilities/loadiconwithscaledown.md): (static) Loads an icon from an embedded resource. If the icon is not a standard size, this function scales down a larger image.
- [MakeArgb](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.drawingutilities/makeargb.md): (static) Stores a color into an integer from 4 bytes.
- [PixelsFromSvg](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.drawingutilities/pixelsfromsvg.md): (2 overloads, static) Get array of bytes that represent RGBA values for an image of a given size created from SVG
- [SvgToRhinoDibIntPtr](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.drawingutilities/svgtorhinodibintptr.md): (static) Create bitmap of a given size from an svg string
