anchor.diff:    core.Coordinate _mouseLocation;
     bool _frameRequested = false;
   
  -  QrDemo(this._canvas) :
  +  factory QrDemo(CanvasElement canvas) {
  +    final minDimension = Math.min(canvas.width, canvas.height);
  +
  +    final scale = minDimension ~/ size;
  +
  +    final offset = (minDimension - (scale * size)) ~/ 2;
  +
  +    return new QrDemo._internal(canvas, scale, offset);
  +  }
  +
  +  QrDemo._internal(this._canvas, this.scale, this.offset) :
       _qrMapper = new core.SendPortValue(spawnFunction(_qrIsolate)) {
       _qrMapper.outputChanged.add((args) {
         _squares = _qrMapper.output;
  
positive.code:     _frameRequested = false;
      if(_ctx == null) {
        _ctx = _canvas.context2d;
      }
  
      _ctx.fillStyle = 'white';
      _ctx.fillRect(0, 0, size * scale, size * scale);
      _ctx.fillStyle = 'black';
  
      if(_squares.length > 0) {
        assert(_squares.length == size * size);
        for(int x = 0; x < size; x++) {
          for(int y = 0; y < size; y++) {
            if(_squares[x * size + y]) {
              _ctx.fillRect(x * scale, y * scale, scale, scale);
            }
          }
        }
  
negative.code: }
  
  class QrDemo{
    static final int errorCorrectLevel = core.QrErrorCorrectLevel.M;
    static final int typeNumber = 10;
    static final int size = typeNumber * 4 + 17;
  
    final CanvasElement _canvas;
    final core.SendPortValue<String, List<bool>> _qrMapper;
    final int scale;
    final int offset;
  
    List<bool> _squares;
    CanvasRenderingContext2D _ctx;
  