Class Surface

java.lang.Object
io.github.jwharm.cairobindings.Proxy
org.freedesktop.cairo.Surface
All Implemented Interfaces:
AutoCloseable
Direct Known Subclasses:
ImageSurface, PDFSurface, PSSurface, RecordingSurface, ScriptSurface, SurfaceObserver, SVGSurface, TeeSurface

Base class for surfaces.

Surface is the abstract type representing all different drawing targets that cairo can render to. The actual drawings are performed using a cairo context.

A cairo surface is created by using backend-specific constructors, typically of the form of a static create() method.

Most surface types allow accessing the surface without using Cairo functions. If you do this, keep in mind that it is mandatory that you call flush() before reading from or writing to the surface and that you must use markDirty() after modifying it.

Note that for surface types other than ImageSurface it might be necessary to acquire the surface's device first. See Device.acquire() for a discussion of devices.