renderToCanvas method

List<RenderCommand> renderToCanvas(
  1. Canvas canvas
)

Renders the skeleton drawable's current pose to the given canvas. Does not perform any scaling or fitting.

Implementation

List<RenderCommand> renderToCanvas(Canvas canvas) {
  var commands = render();
  for (final cmd in commands) {
    canvas.drawVertices(cmd.vertices, rendering.BlendMode.modulate, atlas.atlasPagePaints[cmd.atlasPageIndex][cmd.blendMode]!);
  }
  return commands;
}