Skip to main content
All docs
V24.1

DevExpress.Drawing Graphics Library

  • 3 minutes to read

The DevExpress.Drawing Graphics Library contains the basic drawing functionality for DevExpress components. This library ships with the DevExpress primitives, which serve as counterparts for the System.Drawing primitives (Font, Pen, Brush, and so on).

The DevExpress.Drawing Graphics Library is available for the following products:

The library can utilize two drawing engines: one based on GDI+, another based on SkiaSharp. This article describes the library usage with different operating systems and frameworks, and limitations in each supported product.

Default Drawing Library Behavior (GDI+) for Windows Environments

The DevExpress.Drawing library automatically enables the GDI+ engine. No additional references or actions are required.

Warning

Normally, you must not use the SkiaSharp-based engine on Windows, because the GDI+ engine is automatically used by default. The only rare and advanced usage scenario to enable the SkiaSharp-based engine on Windows, is when your app ran out of the available desktop heap or hit the quota of 10K GDI handlers per process. For instance, this may happen when a DevExpress report contains multiple complex XRRichText components (due to USER32 kernel objects we create to draw content or measure text using Windows GDI+ API). In this case, call the DevExpress.Drawing.Internal.DXDrawingEngine.ForceSkia() method to force the Skia-based rendering in your Windows-based app.

System.Drawing.Common Compatibility Issues

The GDI+ engine is not compatible with the System.Drawing.Common package version 7 and higher in non-Windows environments. If your application depends on that package, a NotSupportedException is thrown. In this case, you need to switch the drawing engine to Skia-based render. See the following section for instructions.

Enable the SkiaSharp Drawing Engine for non-Windows Environments

The SkiaSharp-based engine is automatically enabled in most cases for non-Windows systems - you don’t need to enable the engine manually.

To enable the SkiaSharp-based engine, add the following packages to your application:

Important

If the engine is not enabled automatically and the NotSupportedException is thrown, call the DevExpress.Drawing.Internal.DXDrawingEngine.ForceSkia() method to force the Skia-based rendering. Please note that this API is marked as internal and we may change it in the future. Please research why the SkiaSharp-based engine was not enabled automatically in your environment (you can contact the DevExpress Support team, specify your OS version, installed software dependencies, if you already added required packages to your non-Windows app).

Refer to the following article for more information on library troubleshooting:

Read Tutorial: Troubleshooting

Limitations

The following features are not available in supported products in non-Windows environments:

  • Export to EMF and WMF image formats.
  • Print documents, workbooks, and PDF files.
See Also