PsCanvas

Overview

PsCanvas is a class in Aspose.Page FOSS for Python.

Canvas that appends PostScript operators to a page.

This class provides 23 methods for working with PsCanvas objects in Python programs. Available methods include: __init__, clip, close_path, concat, curve_to, draw_image, draw_text, ellipse, fill, fill_stroke, init_clip, line_to, and 11 additional methods. All public members are accessible to any Python application after installing the Aspose.Page FOSS for Python package.

Methods

SignatureDescription
__init__(page: PsPage)
move_to(x: float, y: float)Moves the current drawing point to the coordinates (x, y) without creating a line segment
line_to(x: float, y: float)
curve_to(x1: float, y1: float, x2: float, y2: float, x3: float, y3: float)
close_path()
rect(x: float, y: float, w: float, h: float)
ellipse(x: float, y: float, w: float, h: float)
stroke()
fill()
fill_stroke()
set_stroke_color(color: tuple[float, ...])Sets the stroke color value.
set_fill_color(color: tuple[float, ...])Sets the fill color value.
set_line_width(width: float)Sets the line width value.
set_line_cap(cap: int)Sets the line cap value.
set_line_join(join: int)Sets the line join value.
set_miter_limit(limit: float)Sets the miter limit value.
concat(matrix: tuple[float, float, float, float, float, float])
save_state()
restore_state()
clip()
init_clip()
draw_text(text: str, x: float, y: float, font_name: str, size: float)
draw_image(image: PsImage, x: float, y: float, w: float, h: float)

See Also