S or /

SourceModule surface

Describes a drawing destination: a Surface manages the pixels or GPU resources that a skia.Canvas draws into.

Classes§

Surface

Surface is responsible for managing the pixels that a canvas draws into. The pixels can be allocated either in CPU memory (a raster surface) or on the GPU (a RenderTarget surface). Surface takes care of allocating a Canvas that will draw into the surface. Call Surface.canvas() to use that canvas (but don't delete it, it is owned by the surface). Surface always has non-zero dimensions. If there is a request for a new surface, and either of the requested dimensions are zero, then None will be returned.

Functions§

Constants§

Re-exports§