Clipping the canvas

We can apply a clipPath to a StaticCanvas exactly as we do for objects. The clipPath in this case is influenced by zoom and pan and contrary from Object.clipPath is positioned fom the top-left corner.


  
  

As the old clipTo function, clipPath is clipping controls too, unless you use canvas.controlsAboveOverlay set to true


  
  

Animating the clipPaths

ClipPaths can be animated as any other object. Canvas clipPath animation is very efficent, while animating the Object's one will invalidate the object cache each time.


  
  Continue with more examples