VintaSoft Imaging .NET SDK 12.1: Documentation for .NET developer
Vintasoft.Imaging.Drawing Namespace / DrawingFactory Class
Members Object Syntax Remarks Example Hierarchy Requirements SeeAlso
In This Topic
    DrawingFactory Class
    In This Topic
    Provides the abstract base class of drawing factory that allows to create graphic primitives (pen, brush, font, bitmap, etc) for 2D drawing engine.
    Object Model
    DrawingFactory DrawingFactory FontProgramsControllerBase Resolution
    Syntax
    'Declaration
    
    Public MustInherit Class DrawingFactory
    
    
    public abstract class DrawingFactory
    
    
    public __gc abstract class DrawingFactory
    
    
    public ref class DrawingFactory abstract
    
    
    Remarks

    VintaSoft Imaging .NET SDK has several 2D drawing engines:

    • Vintasoft.Imaging.Gdi.dll
    • - Windows-only drawing engine based on GDI+ graphics library.
    • Vintasoft.Imaging.Drawing.SkiaSharp.dll
    • - cross-platform drawing engine based on SkiaSharp graphics library.

    Example

    Here is an example that shows how to set the default drawing factory:

    
    ''' <summary>
    ''' Sets the SKIA Sharp drawing factory as a default drawing factory.
    ''' </summary>
    Public Shared Sub SetSkiaSharpSdkDrawing()
        ' Skia - cross platform drawing engine
        Vintasoft.Imaging.Drawing.SkiaSharp.SkiaSharpDrawingFactory.SetAsDefault()
    End Sub
    
    ''' <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
    
    
    
    /// <summary>
    /// Sets the SKIA Sharp drawing factory as a default drawing factory.
    /// </summary>
    public static void SetSkiaSharpSdkDrawing()
    {
        // Skia - cross platform drawing engine
        Vintasoft.Imaging.Drawing.SkiaSharp.SkiaSharpDrawingFactory.SetAsDefault();
    }
    
    /// <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();
    }
    
    

    Inheritance Hierarchy
    Requirements

    Target Platforms: .NET 7; .NET 6; .NET 5; .NET Core 3.1; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

    See Also