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_get_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.