Module freya_engine::prelude 
source · Modules
Structs
- Multiple decorations can be applied at once. Ex: Underline and overline is (0x1 | 0x2)
- Wrapper type of a font weight.
- Wrapper type for the width of a font.
Enums
- Type that represents either a slice ofColor, 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).
Type Definitions
- Imagedescribes 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.
- MaskFilter is the base class for object that perform transformations on the mask before drawing it. An example subclass is Blur.
- Surfaceis 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- RenderTargetsurface).- Surfacetakes care of allocating a- Canvasthat will draw into the surface. Call- surface_get_canvas()to use that canvas (but don’t delete it, it is owned by the surface).- Surfacealways has non-zero dimensions. If there is a request for a new surface, and either of the requested dimensions are zero, then- Nonewill be returned.