code: function(bounds) {
              var canvas = this.getCanvas();
              
              if (bounds) {
                  this.clearRect(bounds.x || 0, bounds.y || 0, bounds.width || 0, bounds.height || 0);
              }
              else {
                  this.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());
              }
          }
docs: clear canvas
  @method
  @memberof Kinetic.Context.prototype
  @param {Object} [bounds]
  @param {Number} [bounds.x]
  @param {Number} [bounds.y]
  @param {Number} [bounds.width]
  @param {Number} [bounds.height]