PainterFactory class
Factory class for creating appropriate shape painters for rendering instructions.
This factory provides a centralized way to create shape painters based on rendering instruction types. It handles the complexity of painter creation, caching, and type-specific initialization requirements.
Key features:
- Type-based painter creation with automatic detection
- Painter caching and reuse for performance
- Asynchronous initialization support
- Creation statistics tracking
- Special handling for context-dependent painters (captions)
Constructors
- PainterFactory()
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createShapePainter<
T extends Renderinstruction> (RenderInfo< T> renderInfo) → Future<ShapePainter< T> > - Creates a shape painter for the given render information.
-
dispose(
) → void -
getOrCreateShapePainter<
T extends Renderinstruction> (RenderInfo< T> renderInfo) → Future<ShapePainter< T> > - Creates a shape painter for the given render information.
-
getPainterForSerial<
T extends Renderinstruction> (int serial) → ShapePainter< T> ? -
initDrawingLayers(
RenderInfoCollection renderInfoCollection) → Future< void> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removePainterForSerial(
int serial) → void -
setPainterForSerial(
int serial, ShapePainter< Renderinstruction> painter) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited