code: function _restoreCanvas(ctx, data) {
  	if (data.savedTransforms.length === 0) {
  		// Reset transformation state if it can't be restored any more
  		data.transforms = _cloneTransforms(baseTransforms);
  	} else {
  		// Restore canvas context
  		ctx.restore();
  		// Restore current transform state to the last saved state
  		data.transforms = data.savedTransforms.pop();
  	}
  }
docs: Restore canvas context update transformation stack