constructor(doc: PdfDocument, offset: Point): PdfPaths
Initializes a new instance of the PdfPaths class.
Document.
Offset.
bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): PdfPaths
Draws a bezier curve from the current point to a new point using the (cp1x, cp1y) and (cp2x, cp2y) as the control points.
The new current point is (x, y).
The X-coordinate of the first control point, in points.
The Y-coordinate of the first control point, in points.
The X-coordinate of the second control point, in points.
The Y-coordinate of the second control point, in points.
The X-coordinate of the new point, in points.
The Y-coordinate of the new point, in points.
circle(x: number, y: number, radius: number): PdfPaths
Draws a circle.
The X-coordinate of the center of the circle, in points.
The Y-coordinate of the center of the circle, in points.
The radius of the circle, in points.
clip(rule?: PdfFillRule): PdfPaths
Creates a clipping path used to limit the regions of the page affected by painting operators.
The fill rule to use.
closePath(): PdfPaths
Closes the current path and draws a line from the current point to the initial point of the current path.
ellipse(x: number, y: number, radiusX: number, radiusY?: number): PdfPaths
Draws an ellipse.
The X-coordinate of the center of the ellipse, in points.
The Y-coordinate of the center of the ellipse, in points.
The radius of the ellipse along the X-axis, in points.
The radius of the ellipse along the Y-axis, in points. If it is not provided, then it is assumed to be equal to radiusX.
fill(brushOrColor?: any, rule?: PdfFillRule): PdfPaths
Fills the path with the specified brush and rule. If brush is not specified, then the default document brush will be used (see the setBrush method).
The brushOrColor argument can accept the following values:
The brush or color to use.
The fill rule to use.
fillAndStroke(brushOrColor?: any, penOrColor?: any, rule?: PdfFillRule): PdfPaths
Fills and strokes the path with the specified brush, pen and rule. If brush and pen is not specified, then the default document brush and pen will be used (See the setBrush, setPen methods).
The brushOrColor argument can accept the following values:
The penOrColor argument can accept the following values:
The brush or color to use.
The pen or color to use.
The fill rule to use.
lineTo(x: number, y: number): PdfPaths
Draws a line from the current point to a new point.
The new current point is (x, y).
The X-coordinate of the new point, in points.
The Y-coordinate of the new point, in points.
moveTo(x: number, y: number): PdfPaths
Sets a new current point.
The X-coordinate of the new point, in points.
The Y-coordinate of the new point, in points.
polygon(points: number[][]): PdfPaths
Draws a polygon using a given points array.
An array of two-elements arrays [x, y] specifying the X and Y coordinates of the point, in points.
quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): PdfPaths
Draws a quadratic curve from the current point to a new point using the current point and (cpx, cpy) as the control points.
The new current point is (x, y).
The X-coordinate of the control point, in points.
The Y-coordinate of the control point, in points.
The X-coordinate of the new point, in points.
The Y-coordinate of the new point, in points.
rect(x: number, y: number, width: number, height: number): PdfPaths
Draws a rectangle.
The X-coordinate of the topleft corner of the rectangle, in points.
The Y-coordinate of the topleft corner of the rectangle, in points.
The width of the rectangle, in points.
The width of the rectangle, in points.
roundedRect(x: number, y: number, width: number, height: number, cornerRadius?: number): PdfPaths
Draws a rounded rectangle.
The X-coordinate of the upper-left corner of the rectangle, in points.
The Y-coordinate of the upper-left corner of the rectangle, in points.
The width of the rectangle, in points.
The width of the rectangle, in points.
The corner radius of the rectangle, in points. The default value is 0.
stroke(penOrColor?: any): PdfPaths
Strokes the path with the specified pen. If pen is not specified, then the default document pen will be used (See the setPen method).
The penOrColor argument can accept the following values:
The pen or color to use.
Provides methods for creating graphics paths and drawing them or using them for clipping.
Path creation method calls must be finished with the stroke, fill, fillAndStroke or clip method. Any document methods which don't apply directly to path creation/ drawing/ clipping (changing a pen, drawing a text, saving the graphics state etc) are prohibited to use until the path is finished. The lineTo, bezierCurveTo and quadraticCurveTo methods should not start the path, they must be preceded with the moveTo.
The methods are chainable:
This class is not intended to be instantiated in your code.