Skip to main content

Crate img_gen_renderer

Crate img_gen_renderer 

Source
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’s background.
Border
A property to describe an attributes Border.
ColorGradient
A class to represent a gradient of colors.
ConicalGradient
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 Typography attribute.
Generator
A class to represent an image generator.
Icon
An attribute to describe a Layer’s Icon.
Image
A class to represent an Image object.
IrregularPolygonSides
A custom type to ensure irregular polygons have at least 3 offsets.
Layer
A data structure to represent a single Layer in a Layout.
LayerOffset
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 Typography attribute.
LineHeight
A custom type to ensure the minimum number of lines is a positive, non-zero f32.
LinearGradient
A data structure to represent a linear gradient
Mask
An attribute to describe a Layer’s Mask.
Polygon
An attribute to represent a Polygon rendered in the layer.
RadialGradient
A data structure to represent a radial gradient.
Rectangle
An attribute to represent a rectangle rendered in the layer.
RegularPolygonSides
A custom type to ensure regular polygons have at least 3 sides.
Size
A layer attribute to describe the layer’s size.
SolidColor
A class to represent a solid color.
Typography
An attribute to represent a Layer’s rendered text.

Enums§

ColorKind
An enum to describe the possible kinds of colors used when rendering various Layer attributes/properties.
Corners
An enum to represent the possible options in specifying which Rectangle::corners to render rounded.
ImgGenSpecError
Errors produced while validating or parsing image generation specifications.
PolygonSides
A custom type to ensure polygon data has a minimum of 3 points.
PreserveAspect
An enum to describe the how to preserve an image’s dimensions when portrayed in an Icon or Background attribute.
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.
TypographyAlign
A enumeration of the possible alignment options for the text in a Typography attribute.
Weight
An enumeration of the possible font weights.

Constants§

HEIGHT
The default value used for a Size’s height.
TRANSPARENT
A fully transparent RGBA color.
WIDTH
The default value used for a Size’s width.