Skia and Skia4Delphi

<< Click to display table of contents >>

Skia and Skia4Delphi

Skia is an open source 2D graphics library developed by Google. It provides common APIs that work across a variety of hardware and software platforms. It serves as the graphics engine for Google Chrome and ChromeOS, Android, Flutter, and many other products.

Skia4Delphi is a cross-platform 2D graphics API for Delphi based on Google's Skia Graphics Library.

Skia4Delphi is included in RAD Studio starting from RAD Studio 12 Athens. For older versions of Delphi, it can be downloaded separately.

When using Skia4Delphi, TRichView receives additional features.

VCL

In VCL version, Skia4Delphi adds support of additional graphic formats: SVG, WebP, WBMP. Graphics of these types can be inserted in TRichView.

To use SVG support at full extent, add RVSkia unit in your project.

FireMonkey

Skia canvases

In FireMonkey, Skia4Delphi provides its own canvases that can replace default FireMonkey canvases.

To support these canvases in TRichView, add fmxRVSkiaFM unit in your project.

Additionally, fmxRVSkiaFM unit allows using SVG images and PDF saving.

Known problem: drawing on Linux Skia canvas is slow, avoid using GlobalUseSkia = True with TRichView for Linux.

Graphics

Skia4Delphi adds several TBitmap codecs (although, some of them are decoding-only codecs).

Additionally, Skia4Delphi supports SVG images. They can be inserted in TRichView as TRVSvgImageSkiaFM class.

You can use RVGraphicHandler.GetFileDialogFilter to get a filter for opening and saving dialogs. It returns a filter string containing not only raster formats (registered for TBitmap), but also additional formats (such as SVG), if they are available.

PDF

You can use TRVPrint.SavePDF and TRVReportHelper.SavePDF to create PDF files.