IPath
Overview
IPath is a class in Aspose.PDF FOSS for Python.
A path built segment by segment, in the shape ported code expects.
This class declares 9 methods for IPath objects in Python programs.
Available methods include: __init__, __len__, __repr__, append_cubic_bezier_curve, append_line, append_rectangle, close_all_figures, move_to, to_graphics_path.
Public members are accessible to any Python application after installing the Aspose.PDF FOSS for Python package.
Properties: current_x, current_y, fill_mode, transform.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
current_x | float | Read | Get current X position. |
current_y | float | Read | Get current Y position. |
transform | IMatrix | None | Read/Write | Get the transformation matrix. |
fill_mode | str | Read/Write | Get the fill mode. |
Methods
| Signature | Description |
|---|---|
__init__() | Initialize a path. |
move_to(x: float, y: float) | Start a new subpath at (x, y). |
append_line(x: float, y: float) | Add a straight segment to (x, y). |
append_cubic_bezier_curve(x1: float, y1: float, x2: float, y2: float, x: float, y: float) | Add a cubic Bézier curve to (x, y) through two control points. |
append_rectangle(x: float, y: float, width: float, height: float) | Add a closed rectangle as its own subpath. |
close_all_figures() | Close the subpath being built. |
to_graphics_path() → GraphicsPath | This path as the native :class:~aspose_pdf.paths.GraphicsPath. |
__len__() → int | Calls len on this IPath instance. |
__repr__() → str | Calls repr on this IPath instance. |