Type that represents either a slice of Color, or a slice of Color4f and a color space.
Whenever this type is expected, it’s either possible to directly pass a &[Color] , or
a tuple of type (&[Color4f], &ColorSpace).
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.
Returns Surface on GPU indicated by context. Allocates memory for pixels, based on the
width, height, and crate::ColorType in ImageInfo. budgeted selects whether allocation
for pixels is tracked by context. image_info describes the pixel format in
crate::ColorType, and transparency in crate::AlphaType, and color matching in
crate::ColorSpace.
Bitmap describes a two-dimensional raster pixel array. Bitmap is built on ImageInfo,
containing integer width and height, ColorType and AlphaType describing the pixel
format, and ColorSpace describing the range of colors. Bitmap points to [PixelRef],
which describes the physical array of pixels. ImageInfo bounds may be located anywhere fully
inside [PixelRef] bounds.
Image describes a two dimensional array of pixels to draw. The pixels may be
decoded in a raster bitmap, encoded in a [Picture] or compressed data stream,
or located in GPU memory as a GPU texture.
Path contain geometry. Path may be empty, or contain one or more verbs that
outline a figure. Path always starts with a move verb to a Cartesian coordinate,
and may be followed by additional verbs that add lines or curves.
Adding a close verb makes the geometry into a continuous loop, a closed contour.
Path may contain any number of contours, each beginning with a move verb.
Image describes a two dimensional array of pixels to draw. The pixels may be
decoded in a raster bitmap, encoded in a [Picture] or compressed data stream,
or located in GPU memory as a GPU texture.
Path contain geometry. Path may be empty, or contain one or more verbs that
outline a figure. Path always starts with a move verb to a Cartesian coordinate,
and may be followed by additional verbs that add lines or curves.
Adding a close verb makes the geometry into a continuous loop, a closed contour.
Path may contain any number of contours, each beginning with a move verb.
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.
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.