Interface BackdropEffect
- All Known Implementing Classes:
BackdropEffect.Blur,BackdropEffect.Clear,BackdropEffect.Crt,BackdropEffect.Pixelate,BackdropEffect.Wash
Canvas.fillBackdropRoundRect(limn.graphics.RoundRect, limn.graphics.BackdropEffect), which re-samples what the frame has drawn so far under the
shape, transforms it, and lays the tint() over the result.
A closed set, unlike ImageFormat, and the asymmetry is the point: a format is
contributed by whichever encoder is installed, whereas an effect exists only if the renderer has
a branch for it. An open type would let a caller name an effect that nothing can draw, and the
failure would be a blank rectangle rather than a message.
Every variant carries a tint, because glass is never purely the thing behind it, and because
the tint is the documented fallback: a renderer with no backdrop support fills the shape with it
and the layout is still right, which is what Canvas.fillBackdropRoundRect(limn.graphics.RoundRect, limn.graphics.BackdropEffect) does by
default.
Sizes here are in logical points, like every other dimension a widget passes to a canvas; the renderer converts them using the transform in force.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordThe backdrop blurred along one axis.static final recordA transparent pane: the backdrop is not blurred, it is refracted at the rim, the way light bends through the bevelled edge of real glass.static final recordThe backdrop as a cathode-ray tube shows it: bent onto a curved face and striped by the scan.static final recordThe backdrop reduced to squares: redaction, not decoration.static final recordThe backdrop, undisplaced, with its saturation moved. -
Method Summary
Modifier and TypeMethodDescriptionfloatreach()How far outside its shape this effect reads what is behind it, in points: the blur's radius, the pane's thickness, the cell of a pixelation, and nothing for a wash or a tube, which sample only inside the shape.tint()The colour laid over the transformed backdrop, straight (not premultiplied) alpha.
-
Method Details
-
tint
Color tint()The colour laid over the transformed backdrop, straight (not premultiplied) alpha. An alpha of 0 shows the backdrop alone; 1 hides it entirely, which is a plain fill drawn the expensive way. -
reach
float reach()How far outside its shape this effect reads what is behind it, in points: the blur's radius, the pane's thickness, the cell of a pixelation, and nothing for a wash or a tube, which sample only inside the shape.A shape wearing the effect depends on those pixels as much as on the ones under it, so a repaint has to treat a change there as a change behind the shape, and has to repaint that margin with the shape so the effect reads it as the whole frame would have: under what the frame paints later, never over it. A renderer copies at least this much around the shape.
- Returns:
- the reach, 0 or more
-