Module images
Expand description
Factory functions for creating crate::Images, e.g. from a crate::Bitmap, compressed
data, or a crate::Picture.
Enums§
Functions§
- deferred_
from_ encoded_ data - Return a
Imageusing the encoded data, but attempts to defer decoding until the image is actually used/drawn. This deferral allows the system to cache the result, either on the CPU or on the GPU, depending on where the image is drawn. If memory is low, the cache may be purged, causing the next draw of the image to have to re-decode. - deferred_
from_ generator - Creates
Imagefrom data returned byimage_generator. The image data will not be created (on either the CPU or GPU) until the image is actually drawn. Generated data is owned byImageand may not be shared or accessed. - deferred_
from_ picture - Creates
Imagefrom picture. ReturnedImagewidth and height are set by dimensions.Imagedraws picture with matrix and paint, set tobit_depthandcolor_space. - make_
with_ filter - Creates a filtered
Imageon the CPU. filter processes the src image, potentially changing the color, position, and size. subset is the bounds of src that are processed by filter.clip_boundsis the expected bounds of the filteredImage.out_subsetis required storage for the actual bounds of the filteredImage.offsetis required storage for translation of returnedImage. - raster_
from_ bitmap - Creates a CPU-backed
Imagefrombitmap, sharing or copyingbitmappixels. If the bitmap is marked immutable, and its pixel memory is shareable, it may be shared instead of copied. - raster_
from_ compressed_ texture_ data - Creates a CPU-backed
Imagefrom compressed data. - raster_
from_ data - Creates CPU-backed
Imagefrom pixel data described by info. The pixels data will not be copied.