render method
Implementation
void render(
Canvas canvas, {
BlendMode? blendMode,
Rect? cullRect,
Paint? paint,
}) {
paint ??= Paint();
if (kIsWeb) {
for (final batchItem in _batchItems) {
paint.blendMode = blendMode ?? paint.blendMode;
canvas
..save()
..transform(batchItem.matrix.storage)
..drawRect(batchItem.destination, batchItem.paint)
..drawImageRect(
atlas,
batchItem.source,
batchItem.destination,
paint,
)
..restore();
}
} else {
canvas.drawAtlas(
atlas,
_transforms,
_sources,
_colors,
blendMode ?? defaultBlendMode,
cullRect,
paint,
);
}
}