Mac OS X
Components Crossplatform Mac & Win Server Client Old Guides Examples
New in version: 7.1 7.2 7.3 7.4 7.5 8.0 8.1 8.2 8.3 8.4 Statistic
This function marks the current path as clipping path.
|Component||Version||macOS||Windows||Server||FileMaker Cloud||FileMaker iOS SDK|
|The PDF reference returned from DynaPDF.New.|
|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.
DescriptionThis 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.
Clip image to circle:
Created 18th August 2014, last changed 13th February 2018
Feedback: Report problem or ask question.
MBS Xojo PDF Plugins