Class PathContent
A path content element — one or more subpaths plus formatting (fill/stroke).
Returned by AddPath().
All subpath-builder methods return this for fluent chaining.
Inherited Members
Namespace: DRIT.Pdf.Content
Assembly: DRIT.Pdf.dll
Syntax
public sealed class PathContent
Properties
Format
Fill and stroke formatting for this path.
Declaration
public ContentFormat Format { get; }
Property Value
| Type | Description |
|---|---|
| ContentFormat |
Methods
AddRectangle(PdfPoint, PdfSize)
Add a rectangle to the current subpath.
Declaration
public PathContent AddRectangle(PdfPoint bottomLeft, PdfSize size)
Parameters
| Type | Name | Description |
|---|---|---|
| PdfPoint | bottomLeft | The bottom-left corner of the rectangle. |
| PdfSize | size | The size of the rectangle. |
Returns
| Type | Description |
|---|---|
| PathContent | This path for fluent chaining. |
BeginSubpath(PdfPoint)
Begin a new subpath at the specified point.
Declaration
public PathContent BeginSubpath(PdfPoint point)
Parameters
| Type | Name | Description |
|---|---|---|
| PdfPoint | point | The starting point of the subpath. |
Returns
| Type | Description |
|---|---|
| PathContent | This path for fluent chaining. |
BezierTo(PdfPoint, PdfPoint, PdfPoint)
Add a cubic Bezier curve to the current subpath.
Declaration
public PathContent BezierTo(PdfPoint cp1, PdfPoint cp2, PdfPoint end)
Parameters
| Type | Name | Description |
|---|---|---|
| PdfPoint | cp1 | The first control point. |
| PdfPoint | cp2 | The second control point. |
| PdfPoint | end | The curve endpoint. |
Returns
| Type | Description |
|---|---|
| PathContent | This path for fluent chaining. |
Clone()
Create a deep copy of this path, duplicating all subpath operations and format settings.
Declaration
public PathContent Clone()
Returns
| Type | Description |
|---|---|
| PathContent |
CloseSubpath()
Close the current subpath with a straight line to the beginning.
Declaration
public PathContent CloseSubpath()
Returns
| Type | Description |
|---|---|
| PathContent | This path for fluent chaining. |
LineTo(PdfPoint)
Add a straight line segment to the current subpath.
Declaration
public PathContent LineTo(PdfPoint point)
Parameters
| Type | Name | Description |
|---|---|---|
| PdfPoint | point | The endpoint of the line segment. |
Returns
| Type | Description |
|---|---|
| PathContent | This path for fluent chaining. |
Transform(PdfMatrix)
Transform all path points in-place using matrix.
Returns this path for fluent chaining.
Declaration
public PathContent Transform(PdfMatrix matrix)
Parameters
| Type | Name | Description |
|---|---|---|
| PdfMatrix | matrix |
Returns
| Type | Description |
|---|---|
| PathContent |