VintaSoft Imaging .NET SDK 12.4: Documentation for .NET developer
In This Topic
    Draw 2D graphics using GDI+ (System.Drawing) library
    In This Topic
    The Vintasoft.Imaging.dll assembly defines interfaces (IRegion, IDrawingPen, IDrawingBrush, IDrawingSolidBrush, IDrawingHatchBrush, IDrawingImageBrush, IDrawingLinearGradientBrush) and abstract classes (RasterDrawingEngine, DrawingFactory, DrawingFont, DrawingFontMetrics, GraphicsPathBase) for drawing of 2D graphics.


    The Vintasoft.Imaging.Gdi.dll assembly contains implementations of interfaces and abstract classes for drawing of 2D graphics using System.Drawing (GDI+) library:

    Also Vintasoft.Imaging.Gdi.dll assembly contains image codecs, which are implemented in System.Drawing (GDI+) library:

    The Vintasoft.Imaging.dll assembly no longer depends on the System.Drawing library, and therefore the ImagePrintDocument class, which implements image and document printing using the System.Drawing (GDI+) library, has been moved to the Vintasoft.Imaging.Gdi.dll assembly.

    Also the Vintasoft.Imaging.Gdi.dll assembly contains static class GdiConverter, which contains methods for conversion of Vintasoft objects to the GDI+ objects and vice versa.

    VintaSoft Imaging .NET SDK 12.0 and earlier had VintasoftImage.GetImageAsBitmap method, which allowed to convert a VintasoftImage object to a System.Drawing.Bitmap object. Starting from VintaSoft Imaging .NET SDK 12.1 the Vintasoft.Imaging.dll assembly does not contain VintasoftImage.GetAsBitmap method because the Vintasoft.Imaging.dll assembly does not depend from System.Drawing library.
    For backward compatibility the Vintasoft.Imaging.Gdi.dll assembly has extensions for VintasoftImage class, i.e. VintasoftImage class will have GetAsBitmap method (and all other methods, which depend from System.Drawing library) if project has reference to the Vintasoft.Imaging.Gdi.dll assembly. Also the Vintasoft.Imaging.Gdi.dll assembly contains extensions for ImageCollection and JpegFile classes.

    By default the SDK will search and use the Vintasoft.Imaging.Gdi.dll assembly for drawing of 2D graphics if SDK is used in Windows.

    Also it is possible to explicitly specify that SDK should use System.Drawing (GDI+) library for drawing of 2D graphics using the following code:
    /// <summary>
    /// Sets the GDI drawing factory as a default drawing factory.
    /// </summary>
    public static void SetGdiSdkDrawing()
    {
        // GDI - Windows graphics
        Vintasoft.Imaging.Drawing.Gdi.GdiGraphicsFactory.SetAsDefault();
    }
    
    ''' <summary>
    ''' Sets the GDI drawing factory as a default drawing factory.
    ''' </summary>
    Public Shared Sub SetGdiSdkDrawing()
        ' GDI - Windows graphics
        Vintasoft.Imaging.Drawing.Gdi.GdiGraphicsFactory.SetAsDefault()
    End Sub