CanvasRenderer constructor

CanvasRenderer(
  1. int _scale,
  2. CanvasRenderingContext2D _ctx
)

Implementation

CanvasRenderer(this._scale, this._ctx) {
  // help us get pixel-perfect rendering
  _ctx.imageSmoothingEnabled = false;
  // make things more consistent with how we think of things on the screen
  _ctx.translate(0.5, 0.5);
}