---
title: "Graphics Class"
canonical: https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Drawing_Graphics.htm
product: "Graphics Mill"
---

# Graphics Class
 
Represents the advanced drawing functionality provided by Graphics Mill.
 
**Namespace:** [Aurigma.GraphicsMill.Drawing](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Drawing.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public sealed class Graphics : IDisposable
```
 
## Remarks
  
This class is implemented with Anti-Grain Geometry (AGG), that allows getting high quality and precise drawings. The class provides number of methods to draw outlined (DrawFoo methods) and filled (FillFoo methods) lines, curves, shapes, and paths.
 
With the set of [DrawImage()](https://www.graphicsmill.com/docs/gm/O_T_Aurigma_GraphicsMill_Drawing_Graphics_DrawImage.htm.md) methods you can combine and overlay images.
 
Also this class provides a canvas for text output. You can create plain, bounded, distorted, and art texts on Graphics.
 
## Examples
  
```csharp
using (var bitmap = new Bitmap(160, 120, PixelFormat.Format24bppRgb, RgbColor.White))
using (var graphics = bitmap.GetGraphics())
{
    graphics.DrawRectangle(new Pen(RgbColor.Green, 0.5f), 20, 20, 120, 80);
    graphics.FillRectangle(new SolidBrush(RgbColor.Yellow), 20, 20, 120, 80);
    bitmap.Save(@"Images\Output\out.png");
}
```
 
## Inheritance Hierarchy
  
- System.Object
    - Aurigma.GraphicsMill.Drawing.Graphics
 
## Thread Safety
 Static members of this type are not safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.
   
## See Also

### Reference

- [Graphics Members](https://www.graphicsmill.com/docs/gm/AllMembers_T_Aurigma_GraphicsMill_Drawing_Graphics.htm.md)
- [Aurigma.GraphicsMill.Drawing Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Drawing.htm.md)

### Manual

- [Drawing Text and Graphics](https://www.graphicsmill.com/docs/gm/advanced-drawing.htm.md)
