rendering library

The render objects behind the design widgets, for an app's own render objects that must draw as they do.

Classes

RenderDesignRectangle
Paints fill, stroke and effects.
RenderDesignText
Lays out a text in its box and paints its fill, stroke and effects.
TextGlyphs
The letters of a text, drawn with any paint: laid-out paragraphs, or outlines.
TextPaintPlan
Paints a text's fill, stroke and effects in order: drop shadows, the fill, inner shadows, then the stroke over them; then all of it blurred by its layer blurs.

Functions

buildCornerPath(Rect rect, CornerRadius radius, int smoothing) → Path
The outline of rect with radius corners, smoothed by smoothing percent (0–100).
effectReach(Effect effect, {double spread = 0}) → double
How far past the silhouette effect can paint, grown by spread: a shadow as far as it's moved, grown and blurred, a layer blur as far as its blur.
effectsReach(Iterable<Effect> effects, {bool spread = true}) → double
How far past the silhouette effects can paint together: the farthest shadow, with each shape shadow's spread unless spread is false, then blurred further by the layer blurs.
fadePaint(double opacity) → Paint
A layer's paint that fades everything drawn in the layer to opacity, 0–1.
isOpaque(Fill layer) → bool
Whether layer covers what is beneath it completely.
layerBlurSigma(double blur) → double
A layer blur's Gaussian, measured as a shadow's: its full width at half its peak, which is 2.3548σ.
layerBlursOf(Iterable<Effect> effects) → List<LayerBlur>
The layer blurs among effects, topmost first.
paintFor(Fill fill, Rect bounds) → Paint
fill as a paint; gradient handles resolve against bounds: the box, never a stroke band.
paintLayerBlurred(Canvas canvas, List<LayerBlur> blurs, Rect box, Rect bounds, void draw()) → void
Paints what draw paints, blurred by each of blurs in turn, within bounds; a progressive blur's handles are placed in box.
progressiveLevels(ProgressiveBlur blur) → int
How many blurs a progressive blur is drawn at: its blurs' sigmas at most half a pixel apart, from 2 to 16.
shadowBlur(ShadowEffect effect) → ImageFilter
The shadow's blur as an image filter, for a layer drawn blurred as a whole.
shadowPaint(ShadowEffect effect) → Paint
The shadow's color, blurred by a mask when it has a blur.
shadowSigma(ShadowEffect effect) → double
A blur is the full width at half the peak of its Gaussian, which is 2.3548σ.