New to Telerik ReportingStart a free 30-day trial

Class for loading and initializing the current drawing factory based on the configured graphics engine. The drawing factory has two implementations: GDI and Skia, which are accessible through common interface.

Definition

Namespace:Telerik.Drawing.Contract

Assembly:Telerik.Reporting.dll

Syntax:

C#
public static class DrawingFactory

Inheritance: objectDrawingFactory

Properties

Gets or sets the current graphics engine. Setting the graphics engine is supported in .NET applications only. Member of GraphicsEngine.

C#
public static GraphicsEngine CurrentGraphicsEngine { get; }

Methods

Creates and returns an IImage instance with provided parameters.

C#
public static IImage CreateBitmap(int width, int height, PixelFormat format32bppArgb)
Parameters:widthint

The width of the bitmap in pixels.

heightint

The height of the bitmap in pixels.

format32bppArgbPixelFormat

The PixelFormat of the bitmap.

Returns:

IImage

IImage

Creates and returns an IImage instance from the provided object parameter. The parameter is expected to be an instance of IImage, System.Drawing.Image (for GDI rendering), or SKBitmap (for Skia rendering) class.

C#
public static IImage CreateImage(object image)
Parameters:imageobject

IImage, System.Drawing.Image or SKBitmap instance.

Returns:

IImage

IImage
Remarks:

The method can be called when assigning a native image programmatically to an IImageContainer, i.e PictureBox or CheckBox.