Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 9.4   9.5   10.0   10.1   10.2   10.3   10.4   10.5   11.0   11.1    Statistic    FMM    Blog  

DynaPDF.ClosePath

Closes current path.

Component Version macOS Windows Linux Server FileMaker iOS SDK
DynaPDF 3.2 Yes Yes Yes Yes Yes
MBS( "DynaPDF.ClosePath"; PDF; FillMode )   More

Parameters

Parameter Description Example
PDF The PDF reference returned from DynaPDF.New. $pdf
FillMode Fill mode. Can be FillNoClose, StrokeNoClose, FillStrokeNoClose, Fill, Stroke, FillStroke, FillEvOdd, FillStrokeEvOdd, FillEvOddNoClose, FillStrokeEvOddNoClose, NoFill or Close. "fill"

Result

Returns OK or error message.

Description

Closes current path.
In PDF all vector graphics are paths. Paths can be filled, stroked, or both. Filled path can be drawn by applying the nonzero winding number rule or the even-odd rule (see Path Construction and Painting for further information). Both rules produce different results on complex paths but they have no effect on simple paths like rectangles, circles, and so on.
The filling rules are can be used to produce holes in a path; an area that is left unpainted. The draw direction is important when drawing simple shapes like rectangles and so on. See DynaPDF.SetDrawDirection for further information.
The flag NoFill can be used to discard a path that was already drawn.
Paths are invisible until they will be filled or stroked. DynaPDF displays a warning if an unused path is in memory when drawing an image, text, or when closing the page. The function checks whether a path is in memory prior execution. If no open path is detected the function returns with an error message.

See also ClosePath function in DynaPDF manual.

Examples

Draw triangle path:

# blue color
Set Variable [ $r ; Value: MBS("DynaPDF.SetFillColor"; $pdf; 0; 0; 1) ]
# go to start point
Set Variable [ $r ; Value: MBS("DynaPDF.MoveTo"; $pdf; 100; 100) ]
# add more points
Set Variable [ $r ; Value: MBS("DynaPDF.LineTo"; $pdf; 200; 100) ]
Set Variable [ $r ; Value: MBS("DynaPDF.LineTo"; $pdf; 100; 200) ]
# and fill
Set Variable [ $r ; Value: MBS("DynaPDF.ClosePath"; $pdf; "fill") ]

See also

Example Databases

Blog Entries

Created 18th August 2014, last changed 7th March 2020


DynaPDF.CloseImportFile   -   DynaPDF.ConvertColors

Feedback: Report problem or ask question.




Links
MBS Xojo blog

Start Chat