Optional
init: Partial<ClippingMask>Applies clipping mask to ctx
using all paths in paths
array if action property is ClipAction.Normal
or ClipAction.Inverse
.
rect
area is used to calculate an inverse clip.
If action is ClipAction.Release
then will remove any clipping on the ctx
by redrawing it onto a fresh canvas of same size as ctx.canvas
.
Applies a
clip(path)
operation to the current canvas context using given path(s). The mask can optionally be inverted against a given rectangle (eg. the drawing area). It can also "release" a clipped canvas by redrawing the current contents onto a new unclipped canvas.