A place to paint.
Rather than holding a canvas directly, render objects paint using a painting context. The painting context has a canvas, which receives the individual draw operations, and also has functions for painting child render objects.
When painting a child render object, the canvas held by the painting context can change because the draw operations issued before and after painting the child might be recorded in separate compositing layers. For this reason, do not hold a reference to the canvas across operations that might paint child render objects.
Static Methods
-
repaintCompositedChild(
RenderObject child, { bool debugAlsoPaintedParent: false }) → void -
Repaint the given render object.
Properties
Operators
-
operator ==(
other) → bool -
The equality operator.
inherited
Methods
-
addLayer(
Layer layer) → void -
Adds a composited layer to the recording.
-
paintChild(
RenderObject child, Offset offset) → void -
Paint a child render object.
-
pushBackdropFilter(
Offset offset, ImageFilter filter, PaintingContextCallback painter) → void -
Push a backdrop filter.
-
pushClipPath(
bool needsCompositing, Offset offset, Rect bounds, Path clipPath, PaintingContextCallback painter) → void -
Clip further painting using a path.
-
pushClipRect(
bool needsCompositing, Offset offset, Rect clipRect, PaintingContextCallback painter) → void -
Clip further painting using a rectangle.
-
pushClipRRect(
bool needsCompositing, Offset offset, Rect bounds, RRect clipRRect, PaintingContextCallback painter) → void -
Clip further painting using a rounded rectangle.
-
pushOpacity(
Offset offset, int alpha, PaintingContextCallback painter) → void -
Blend further paiting with an alpha value.
-
pushShaderMask(
Offset offset, Shader shader, Rect maskRect, TransferMode transferMode, PaintingContextCallback painter) → void -
Apply a mask derived from a shader to further painting.
-
pushTransform(
bool needsCompositing, Offset offset, Matrix4 transform, PaintingContextCallback painter) → void -
Transform further painting using a matrix.
-
setIsComplexHint(
) → void -
Hints that the painting in the current layer is complex and would benefit from caching.
-
setWillChangeHint(
) → void -
Hints that the painting in the current layer is likely to change next frame.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited -
toString(
) → String -
Returns a string representation of this object.
inherited