Dynamic Icons Scripting Reference - v1.3.0
    Preparing search index...

    Class ClippingMask

    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.

    Implements

    • IPathHandler
    Index

    Constructors

    Methods

    Properties

    Constructors

    Methods

    • 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.

      Parameters

      Returns void

    Properties

    action: ClipAction = ClipAction.Normal

    Type of clip to apply, or ClipAction.Release to remove clipping.

    fillRule: CanvasFillRule = 'nonzero'

    Fill rule to use when clipping using intersecting paths. One of: "evenodd" or "nonzero"