RenderModelBuilder

RenderModelBuilder

Overview

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

Build render documents incrementally.

This class provides 14 methods for working with RenderModelBuilder objects in Python programs. Available methods include: __init__, add_image, add_path, add_text, begin_page, clip, document, end_page, register_color_space, register_function, register_pattern, restore_state, and 2 additional methods. All public members are accessible to any Python application after installing the Aspose.Page FOSS for Python package.

Methods

SignatureDescription
__init__()
set_default_page_size(width: float, height: float)Set the default page size for implicit page creation.
begin_page(width: float, height: float)Begin a new page with explicit size.
end_page()End the current page and append it to the document.
add_path(path: Path, stroke: StrokeStyle | None, fill: Paint | None, fill_rule: str, stroke_paint: Paint | None, overprint: bool, fill_opacity: float, stroke_opacity: float)Add a path render command to the current page.
add_text(text: str, font_ref: str, font_size: float, matrix: Matrix, fill: Paint | None)Add a text render command to the current page.
add_image(image_id: str, width: int, height: int, matrix: Matrix, mask: bool, mask_paint: Paint | None)Add an image render command to the current page.
clip(path: Path, fill_rule: str)Add a clipping path command to the current page.
save_state()Save the current graphics state.
restore_state()Restore the previous graphics state.
document()RenderDocumentReturn the current render document.
register_color_space(color_space: ColorSpace)strRegister a color space resource and return its ID.
register_pattern(pattern: Pattern)strRegister a pattern resource and return its ID.
register_function(function: Function)strRegister a function resource and return its ID.

See Also