DecorationModifierNode
A modifier node that is one step of its component's decoration, at the node's position in the modifier: it wraps every step declared after it and the component's own painting, and is wrapped by every step declared before it.
The element creating it must be additive, since that is what gives the node its position among the other steps; a node whose element is not additive is refused as it attaches. A child declares that element through decoration.
The library gathers outsets and isOpaque after each modifier pass that attaches, detaches, moves or writes a step, so an element's update needs no call for them. Decoration nodes automatically invalidate their component's declared-node consumer after an element update. A node with fixed metadata can opt out and own its repaint, as DrawModifierNode does. A node that changes one of them between passes calls invalidateDecoration. A change that only affects paint is a component.repaint(). The outsets a step reserves reach the component's insets under a Foundation container. Under any other parent only the part of them the component's PaintOutsets value leaves in layout does, none by default.
Inheritors
Properties
Functions
Whether this decorator needs the component's paint bounds worked out, through paintBounds, while no visible child has an edge past the layout bounds and no decorator has outsets; true by default. A child with an edge past the layout bounds, or a decorator with outsets, has them worked out whatever this answers. Return false only when this decorator, in a box of width by height, cannot enlarge a box-sized content's paint bounds beyond its outsets.
Refuses an element that is not additive. An element naming Decoratable as its target type is refused before this node is created; otherwise this node is refused if the component is not a Decoratable.
Runs onRemovedFromDecoration. The component is handed the decoration without this step once the modifier pass ends.
Paints this decoration and, at the point of its own choosing, the content inside it.
The area this decorator and its content can paint, in a box of width by height. The default includes the box and the content's bounds, grown by outsets. Override this when painting, clipping, or transforming content changes that area. The returned shape reserves paint space, not a clip. It also decides hit testing past the layout bounds: a press there reaches a child only where the paint bounds of a one-pixel content at the point cover the point.