Class ImageSurface

java.lang.Object
All Implemented Interfaces:
AutoCloseable

public final class ImageSurface extends Surface
Image Surfaces — Rendering to memory buffers.

Image surfaces provide the ability to render to memory buffers either allocated by cairo or by the calling code. The supported image formats are those defined in Format.

The PNG functions allow reading PNG images into image surfaces, and writing any surface to a PNG file. It is a toy API. It only offers very simple support for reading and writing PNG files, which is sufficient for testing and demonstration purposes. Applications which need more control over the generated PNG file should access the pixel data directly, using getData() or a backend-specific access function, and process it with another library, e.g. gdk-pixbuf or libpng.

Since:
1.0
See Also: