Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4    Statistic  


This function marks the current path as clipping path.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
DynaPDF 3.2 Yes Yes Yes Yes Yes

MBS( "DynaPDF.ClipPath"; PDF; ClipMode; FillMode )


Parameter Description Example value
PDF The PDF reference returned from DynaPDF.New. $pdf
ClipMode The clipping mode. Can be EvenOdd for using the Even-Odd rule or winding for using the nonzero Winding Number rule. "winding"
FillMode Fill mode. Can be FillNoClose, StrokeNoClose, FillStrokeNoClose, Fill, Stroke, FillStroke, FillEvOdd, FillStrokeEvOdd, FillEvOddNoClose, FillStrokeEvOddNoClose, NoFill or Close. "fill"


Returns OK or error.


This function marks the current path as clipping path.
The function must be called after a closable path was created. A path that consists of a DynaPDF.MoveTo and DynaPDF.LineTo only call cannot be closed!
A clipping path can also be filled, stroked, or both in one pass. However, the combination of a clipping path operator with a path painting operator is seldom used and not supported in all PDF viewers. To avoid unnecessary problems a path should always be clipped and painted in two separate steps, also if this causes some unnecessary overhead.
Once the clipping was created and activated with DynaPDF.ClipPath you can draw arbitrary contents into it, such as images, text, or vector graphics.
A clipping path is part of the current graphics state. The only way to deactivate a clipping path is to restore the graphics state with DynaPDF.RestoreGraphicState. This assumes that it was saved with DynaPDF.SaveGraphicState before the clipping path was created.
Note that it is not possible to extend or widen an active clipping path. It is only possible to intersect it with a new one. The intersection of two clipping paths is never larger than the initial clipping path.
Text objects are handled separately in PDF for use as clipping path. See DynaPDF.SetTextDrawMode for further information.

See also ClipPath function in DynaPDF manual.

See also

DynaPDF.Clear   -   DynaPDF.CloseImportFile

Feedback: Report problem or ask question.

MBS FileMaker blog