Expand description
Rendering primitives and runtime errors for image generation.
This crate turns validated image-generation specifications into images.
Re-exports§
pub use error::ImgGenRendererError;pub use error::Result;
Modules§
- error
- Error types produced while rendering images or loading renderer resources.
- validators
- Public validation types used to describe layouts, layers, and styling.
Structs§
- Arc
- An attribute to represent an Arc rendered in the layer.
- Background
- An attribute to describe a
Layer’sbackground. - Border
- A property to describe an attributes
Border. - Color
Gradient - A class to represent a gradient of colors.
- Conical
Gradient - A data structure to represent a conical gradient.
- Debug
- A struct to describe a
Layout’s visual debug output. - Ellipse
- An attribute to represent an Ellipse rendered in the layer.
- Font
- A property to implicitly describe the font used in a
Typographyattribute. - Generator
- A class to represent an image generator.
- Icon
- An attribute to describe a
Layer’sIcon. - Image
- A class to represent an Image object.
- Irregular
Polygon Sides - A custom type to ensure irregular polygons have at least 3 offsets.
- Layer
- A data structure to represent a single
Layerin aLayout. - Layer
Offset - A layer attribute to describe the layer’s offset (from top left corner).
- Layout
- A data structure used to represent a generated image’s layout.
- Line
- A property to implicitly describe the size of the text in a
Typographyattribute. - Line
Height - A custom type to ensure the minimum number of lines is a positive, non-zero
f32. - Linear
Gradient - A data structure to represent a linear gradient
- Mask
- An attribute to describe a
Layer’sMask. - Polygon
- An attribute to represent a
Polygonrendered in the layer. - Radial
Gradient - A data structure to represent a radial gradient.
- Rectangle
- An attribute to represent a rectangle rendered in the layer.
- Regular
Polygon Sides - A custom type to ensure regular polygons have at least 3 sides.
- Size
- A layer attribute to describe the layer’s size.
- Solid
Color - A class to represent a solid color.
- Typography
- An attribute to represent a
Layer’s rendered text.
Enums§
- Color
Kind - An enum to describe the possible kinds of colors used when rendering various
Layerattributes/properties. - Corners
- An enum to represent the possible options in specifying which
Rectangle::cornersto render rounded. - ImgGen
Spec Error - Errors produced while validating or parsing image generation specifications.
- Polygon
Sides - A custom type to ensure polygon data has a minimum of 3 points.
- Preserve
Aspect - An enum to describe the how to preserve an image’s dimensions when portrayed in
an
IconorBackgroundattribute. - Presets
- A collection of presets ported from the webgradients.com. These are also present in the Qt framework.
- Spread
- A enumeration to describe gradient spread behavior at the bounds of the gradient.
- Typography
Align - A enumeration of the possible alignment options for the text in a
Typographyattribute. - Weight
- An enumeration of the possible font weights.
Constants§
- HEIGHT
- The default value used for a
Size’sheight. - TRANSPARENT
- A fully transparent RGBA color.
- WIDTH
- The default value used for a
Size’swidth.