code: function (clip) {
      var canvas = this.canvas;
      var context = canvas.getContext('2d');
      morpheus.CanvasUtil.resetTransform(context);
      var width = this.getUnscaledWidth();
      var height = this.getUnscaledHeight();
      context.clearRect(0, 0, width, height);
      if (this.prePaint) {
        morpheus.CanvasUtil.resetTransform(context);
        context.translate(this.offset.x, this.offset.y);
        this.prePaint(clip, context);
      }
      morpheus.CanvasUtil.resetTransform(context);
      if (this.offscreenCanvas) {
        if (this.invalid) {
          var oc = this.offscreenCanvas.getContext('2d');
          morpheus.CanvasUtil.resetTransform(oc);
          context.translate(this.offset.x, this.offset.y);
          oc.clearRect(0, 0, width, height);
          this.draw(clip, oc);
        }
        if (width > 0 && height > 0) {
          context.drawImage(this.offscreenCanvas, 0, 0, width, height);
        }
      } else {
        this.draw(clip, context);
      }
      if (this.postPaint) {
        morpheus.CanvasUtil.resetTransform(context);
        context.translate(this.offset.x, this.offset.y);
        this.postPaint(clip, context);
      }
      this.lastClip = clip;
      this.invalid = false;
    }
docs: Paint this canvas using the specified clip.