PDFium Delphi Component Docs

PathInfo method

Component: TPdf  ·  Unit: PDFium
Read the geometry and paint mode of a path object as a list of segments

Syntax

function PathInfo(Index: Integer): TPdfPathInfo;

IndexInteger. Zero-based index of a page object whose ObjectType is otPath
ResultTPdfPathInfo. Record with FillMode (fmNone, fmAlternate or fmWinding), a Stroke flag and a Segments array describing the outline

Description

Each entry of Segments is a TPdfPathSegment holding a SegmentType of pstMoveTo, pstLineTo or pstBezierTo - the point it targets and a Closed flag marking the end of a sub-path. A Bézier segment also reports HasControlPoints, FirstControlPoint and SecondControlPoint when the loaded PDFium build exposes exact cubic control-point readback

FillMode and Stroke together decide how the outline is painted. A path can be filled, stroked, both or neither; a path that is neither is still meaningful, because it can act as a clip

Coordinates are in PDF page units and are not affected by the object matrix, which PageObjectInfo reports separately

See Also

CreatePath, AddPath, PageObjectClipPath, PageObjectInfo