This class represents drawing functionality provided with Graphics Mill for .NET.
Namespace:
Aurigma.GraphicsMill.Drawing
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Public Class GdiGraphics _ Inherits UnitConverterObject
public class GdiGraphics : UnitConverterObject
Filling methods are drawing filled shapes without outline:
This class also provides wide functionality for text output. There are a number of overloads of the DrawString() method: draw simple string filled with solid color, draw outlined text, draw multiline text, etc.
Also, you can draw image through this class. It can be done with overloads of the DrawImage() method.
Sometimes you need to prevent some parts of the bitmap or the device context to be drawn at (i.e. clip the drawing that is outside of some region). Fortunately GdiGraphics have a built-in clipping support. You can specify clipping region through the SetClip() method, and apply set-theory operations (IntersectClip() and ExcludeClip() methods), reset clipping region (ResetClip()), move it (TranslateClip()), etc.
If GdiGraphics features are not enough for you, you can use a power of Windows GDI. Using GetHdc() method you can get a HDC this graphics represents, and use it in GDI functions.
GDI cannot handle bitmaps with an alpha channel when it draws anything on it. As the high byte of 4-byte color must be zero in GDI, each pixel drawn with GDI becomes transparent. So now, if you try to call any drawing methods for the bitmaps with an alpha channel when using GDI, the UnsupportedPixelFormatException exception will be thrown.