Skip to main content

Module encode

Module encode 

Source
Expand description

Paints for drawing shapes.

Modulesยง

private ๐Ÿ”’

Structsยง

EncodedBlurredRoundedRectangle
An encoded blurred, rounded rectangle.
EncodedExternalTexture
An encoded external texture.
EncodedGradient
An encoded gradient.
EncodedImage
An encoded image.
FocalData
Focal data for a radial gradient.
GradientCacheKey
Cache key for gradient color ramps based on color-affecting properties.
GradientLut
A lookup table for sampled gradient values.
GradientRange
An encoded range between two color stops.
LinearKind
Computed properties of a linear gradient.
SweepKind
Computed properties of a sweep gradient.

Enumsยง

EncodedKind
A kind of encoded gradient.
EncodedPaint
An encoded paint.
RadialKind
A radial gradient.

Constantsยง

DEGENERATE_THRESHOLD ๐Ÿ”’
MAX_GRADIENT_LUT_SIZE
The maximum size of the gradient LUT.
NUDGE_VAL ๐Ÿ”’

Traitsยง

EncodeExt
A trait for encoding paints.
GradientLutExt
A helper trait for converting gradient colors 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 p1 and p2.
validate ๐Ÿ”’
Returns a fallback paint in case the gradient is invalid.
x_y_advances ๐Ÿ”’