Class PdfGlyphPath
Represents a glyph path in a PDF document, providing access to its segments.
public sealed class PdfGlyphPath
- Inheritance
-
PdfGlyphPath
- Inherited Members
Remarks
A glyph path is a series of segments that define the shape of a character or symbol in a PDF. This class allows you to retrieve individual segments or enumerate all segments in the glyph path.
Properties
SegmentCount
Gets the number of segments in the glyph path associated with the current PDF element.
public int SegmentCount { get; }
Property Value
Methods
GetSegment(int)
Retrieves the glyph path segment at the specified index.
public PdfGlyphPathSegment GetSegment(int index)
Parameters
index
intThe zero-based index of the segment to retrieve. Must be greater than or equal to 0 and less than SegmentCount.
Returns
- PdfGlyphPathSegment
A PdfGlyphPathSegment representing the glyph path segment at the specified index.
Exceptions
- ArgumentOutOfRangeException
Thrown if
index
is less than 0 or greater than or equal to SegmentCount.- dotPDFiumException
Thrown if the segment cannot be retrieved due to an internal error.
GetSegments()
Retrieves all glyph path segments in the current collection.
public IEnumerable<PdfGlyphPathSegment> GetSegments()
Returns
- IEnumerable<PdfGlyphPathSegment>
An IEnumerable<T> of PdfGlyphPathSegment objects representing the glyph path segments.
Remarks
This method lazily enumerates the glyph path segments, yielding each segment one at a time. It is suitable for scenarios where processing segments incrementally is preferred.