# Graphics class

Namespace: [Eto.Drawing](https://eto.picoe.ca/api/namespace/eto.drawing.md) · Assembly: [Eto](https://eto.picoe.ca/api/assembly/eto.md)

```cs
[Handler(Graphics.IHandler)]
public class Graphics : Widget
```

Graphics context object for drawing operations

**Remarks:** This class allows you to draw on either a [Bitmap](https://eto.picoe.ca/api/type/eto.drawing.bitmap.md) or a `Drawable` control.

## Constructors

- [Graphics](https://eto.picoe.ca/api/type/eto.drawing.graphics/ctor.md): (3 overloads) Initializes a new instance of the [Graphics](https://eto.picoe.ca/api/type/eto.drawing.graphics.md) class.

## Properties

- [AntiAlias](https://eto.picoe.ca/api/type/eto.drawing.graphics/antialias.md): Gets or sets a value indicating that drawing operations will use anti-aliasing
- [ClipBounds](https://eto.picoe.ca/api/type/eto.drawing.graphics/clipbounds.md): Gets the bounds of the clipping region
- [CurrentTransform](https://eto.picoe.ca/api/type/eto.drawing.graphics/currenttransform.md): Gets a copy of the current transform.
- [DPI](https://eto.picoe.ca/api/type/eto.drawing.graphics/dpi.md): Gets the dots per inch of the current graphics context. Usually 96 for windows and 72 for other systems
- [ImageInterpolation](https://eto.picoe.ca/api/type/eto.drawing.graphics/imageinterpolation.md): Gets or sets the interpolation mode for drawing images
- [IsRetained](https://eto.picoe.ca/api/type/eto.drawing.graphics/isretained.md): Gets a value indicating the graphics sub-system is a retained system (e.g. WPF)
- [PixelOffsetMode](https://eto.picoe.ca/api/type/eto.drawing.graphics/pixeloffsetmode.md): Gets or sets the pixel offset mode for draw operations
- [PixelsPerPoint](https://eto.picoe.ca/api/type/eto.drawing.graphics/pixelsperpoint.md): Gets the scale of points to pixels. Multiply by point value to get pixel size
- [PointsPerPixel](https://eto.picoe.ca/api/type/eto.drawing.graphics/pointsperpixel.md): Gets the scale of points per pixel. Multiply by pixel size to get point value (e.g. to set font size in pixels).

## Methods

- [Clear](https://eto.picoe.ca/api/type/eto.drawing.graphics/clear.md): (2 overloads) Resets all pixels in the [Graphics.ClipBounds](https://eto.picoe.ca/api/type/eto.drawing.graphics/clipbounds.md) region with the specified `color`
- [DrawArc](https://eto.picoe.ca/api/type/eto.drawing.graphics/drawarc.md): (4 overloads) Draws a 1 pixel wide arc with the specified `color`
- [DrawEllipse](https://eto.picoe.ca/api/type/eto.drawing.graphics/drawellipse.md): (4 overloads) Draws a 1 pixel wide ellipse outline with the specified `color`
- [DrawImage](https://eto.picoe.ca/api/type/eto.drawing.graphics/drawimage.md): (6 overloads) Draws the specified `image` in a rectangle
- [DrawInsetRectangle](https://eto.picoe.ca/api/type/eto.drawing.graphics/drawinsetrectangle.md): Draws an rectangle with colors on the top/left and bottom/right with the given `width`
- [DrawLine](https://eto.picoe.ca/api/type/eto.drawing.graphics/drawline.md): (4 overloads) Draws a 1 pixel wide line with the specified `color`
- [DrawLines](https://eto.picoe.ca/api/type/eto.drawing.graphics/drawlines.md): (4 overloads) Draws a 1 pixel wide set of lines with the specified `points`
- [DrawPath](https://eto.picoe.ca/api/type/eto.drawing.graphics/drawpath.md): (2 overloads) Draws a 1 pixel outline of the specified `path`
- [DrawPolygon](https://eto.picoe.ca/api/type/eto.drawing.graphics/drawpolygon.md): (2 overloads) Draws a 1 pixel wide outline of a polygon with the specified `points`
- [DrawRectangle](https://eto.picoe.ca/api/type/eto.drawing.graphics/drawrectangle.md): (4 overloads) Draws a 1 pixel wide outline of a rectangle with the specified `color`
- [DrawText](https://eto.picoe.ca/api/type/eto.drawing.graphics/drawtext.md): (8 overloads) Draws text with the specified `font`, `brush` and location
- [FillEllipse](https://eto.picoe.ca/api/type/eto.drawing.graphics/fillellipse.md): (4 overloads) Fills an ellipse with the specified `brush`
- [FillPath](https://eto.picoe.ca/api/type/eto.drawing.graphics/fillpath.md): (2 overloads) Fills the specified `path`
- [FillPie](https://eto.picoe.ca/api/type/eto.drawing.graphics/fillpie.md): (4 overloads) Fills a pie with the specified `brush`
- [FillPolygon](https://eto.picoe.ca/api/type/eto.drawing.graphics/fillpolygon.md): (2 overloads) Fills a polygon defined by `points` with the specified `brush`
- [FillRectangle](https://eto.picoe.ca/api/type/eto.drawing.graphics/fillrectangle.md): (4 overloads) Fills a rectangle with the specified `brush`
- [FillRectangles](https://eto.picoe.ca/api/type/eto.drawing.graphics/fillrectangles.md): (2 overloads) Fills the specified `rectangles`
- [Flush](https://eto.picoe.ca/api/type/eto.drawing.graphics/flush.md): Flushes the drawing (for some platforms)
- [IsVisible](https://eto.picoe.ca/api/type/eto.drawing.graphics/isvisible.md): Returns true if the clip region intersects the specified rectangle.
- [MeasureString](https://eto.picoe.ca/api/type/eto.drawing.graphics/measurestring.md): Measures the string with the given `font`
- [MultiplyTransform](https://eto.picoe.ca/api/type/eto.drawing.graphics/multiplytransform.md): Multiplies the co-ordinate system with the given `matrix`
- [ResetClip](https://eto.picoe.ca/api/type/eto.drawing.graphics/resetclip.md): Resets the clip bounds to encompass the entire drawing area
- [RestoreTransform](https://eto.picoe.ca/api/type/eto.drawing.graphics/restoretransform.md): Restores the transform state
- [RotateTransform](https://eto.picoe.ca/api/type/eto.drawing.graphics/rotatetransform.md): Rotates the co-ordinate system by the given `angle`
- [SaveTransform](https://eto.picoe.ca/api/type/eto.drawing.graphics/savetransform.md): Saves the current transform state
- [SaveTransformState](https://eto.picoe.ca/api/type/eto.drawing.graphics/savetransformstate.md): Gets an object that will restore to the current transform state when disposed.
- [ScaleTransform](https://eto.picoe.ca/api/type/eto.drawing.graphics/scaletransform.md): (3 overloads) Scales the co-ordinate system by a factor
- [SetClip](https://eto.picoe.ca/api/type/eto.drawing.graphics/setclip.md): (2 overloads) Sets the clip region to the specified `path`
- [TranslateTransform](https://eto.picoe.ca/api/type/eto.drawing.graphics/translatetransform.md): (2 overloads) Translates the origin of the co-ordinate system by the given offset

## Inherited Members

- From [Widget](https://eto.picoe.ca/api/type/eto.widget.md): [ControlObject](https://eto.picoe.ca/api/type/eto.widget/controlobject.md), [Handler](https://eto.picoe.ca/api/type/eto.widget/handler.md), [ID](https://eto.picoe.ca/api/type/eto.widget/id.md), [IsDisposed](https://eto.picoe.ca/api/type/eto.widget/isdisposed.md), [NativeHandle](https://eto.picoe.ca/api/type/eto.widget/nativehandle.md), [Platform](https://eto.picoe.ca/api/type/eto.widget/platform.md), [Properties](https://eto.picoe.ca/api/type/eto.widget/properties.md), [Style](https://eto.picoe.ca/api/type/eto.widget/style.md), [StyleChanged](https://eto.picoe.ca/api/type/eto.widget/stylechanged.md), [Dispose](https://eto.picoe.ca/api/type/eto.widget/dispose.md), [GetCallback](https://eto.picoe.ca/api/type/eto.widget/getcallback.md), [Initialize](https://eto.picoe.ca/api/type/eto.widget/initialize.md), [OnStyleChanged](https://eto.picoe.ca/api/type/eto.widget/onstylechanged.md), [ToString](https://eto.picoe.ca/api/type/eto.widget/tostring.md)
