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

NameTypeAccessDescription
current_xfloatReadGet current X position.
current_yfloatReadGet current Y position.
transformIMatrix | NoneRead/WriteGet the transformation matrix.
fill_modestrRead/WriteGet the fill mode.

Methods

SignatureDescription
__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() → GraphicsPathThis path as the native :class:~aspose_pdf.paths.GraphicsPath.
__len__() → intCalls len on this IPath instance.
__repr__() → strCalls repr on this IPath instance.

See Also