|Examples||Mac & Win||Server||Client||Guides||Statistic||FMM||Blog||Deprecated||Old|
This function marks the current path as clipping path.
|DynaPDF||3.2||✅ Yes||✅ Yes||✅ Yes||✅ Yes||✅ Yes|
|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:
This function checks for a license.
Created 18th August 2014, last changed 17th January 2019