Xojo Conferences
XDCMay2019MiamiUSA
MBSOct2019CologneDE

DynaPDF Manual - Page 195

Previous Page 194   Index   Next Page 196

Function Reference
Page 195 of 766
ClosePath
Syntax:
LBOOL pdfClosePath(
const PPDF* IPDF,
// Instance pointer
TPathFillMode FillMode) // see below
typedef enum
{
// Nonzero Winding Number Rule
fmFillNoClose,
// Fill but do not close the path
fmStrokeNoClose,
// Stroke but do not close the path
fmFillStrokeNoClose,
// Fill and stroke but do not close the path
fmFill,
// Fill the path
fmStroke,
// Stroke the path
fmFillStroke,
// Fill and stroke the path
// Even-Odd Rule
fmFillEvOdd,
// Fill the path
fmFillStrokeEvOdd,
// Fill and stroke the path
fmFillEvOddNoClose,
// Fill but do not close the path
fmFillStrokeEvOddNoClose, // Fill and stroke but do not close the path
fmNoFill,
// Discard the path
fmClose
// Close the path and begin a new sub path
}TPathFillMode;
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
SetDrawDirection() for further information.
The flag fmNoFill can be used to discard a path that was already drawn.
Remarks:
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.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
 

Previous topic: CloseImportFileEx

Next topic: ComputeBBox