Module surfaces

Enums§

BackendSurfaceAccess

Functions§

null
Returns Surface without backing pixels. Drawing to crate::Canvas returned from Surface has no effect. Calling Surface::image_snapshot() on returned Surface returns None.
raster
Allocates raster Surface. crate::Canvas returned by Surface draws directly into pixels. Allocates and zeroes pixel memory. Pixel memory size is image_info.height() times row_bytes, or times image_info.min_row_bytes() if row_bytes is zero. Pixel memory is deleted when Surface is deleted.
raster_n32_premul
Allocates raster Surface. crate::Canvas returned by Surface draws directly into pixels. Allocates and zeroes pixel memory. Pixel memory size is height times width times four. Pixel memory is deleted when Surface is deleted.
wrap_pixels
Allocates raster Surface. crate::Canvas returned by Surface draws directly into pixels.