Expand description
Paints for drawing shapes.
Modulesยง
- private ๐
Structsยง
- Encoded
Blurred Rounded Rectangle - An encoded blurred, rounded rectangle.
- Encoded
Gradient - An encoded gradient.
- Encoded
Image - An encoded image.
- Focal
Data - Focal data for a radial gradient.
- Gradient
Cache Key - Cache key for gradient color ramps based on color-affecting properties.
- Gradient
Lut - A lookup table for sampled gradient values.
- Gradient
Range - An encoded range between two color stops.
- Linear
Kind - Computed properties of a linear gradient.
- Sweep
Kind - Computed properties of a sweep gradient.
Enumsยง
- Encoded
Kind - A kind of encoded gradient.
- Encoded
Paint - An encoded paint.
- Radial
Kind - A radial gradient.
Constantsยง
- DEGENERATE_
THRESHOLD ๐ - MAX_
GRADIENT_ LUT_ SIZE - The maximum size of the gradient LUT.
- NUDGE_
VAL ๐ - PIXEL_
CENTER_ ๐OFFSET
Traitsยง
- Encode
Ext - A trait for encoding gradients.
- From
F32Color - A helper trait for converting a premultiplied f32 color to
Self.
Functionsยง
- determine_
lut_ ๐size - encode_
stops ๐ - Encode all stops into a sequence of ranges.
- exp ๐
- ts_
from_ ๐line_ to_ line - Calculates the transform necessary to map the line spanned by points src1, src2 to the line spanned by dst1, dst2.
- unit_
to_ ๐line - Calculate the transform necessary to map the unit vector to the line spanned by the points
p1andp2. - validate ๐
- Returns a fallback paint in case the gradient is invalid.
- x_
y_ ๐advances