Skip to contents

Wraps FPDFPageObj_CreateNewPath + FPDFPage_InsertObject. The new path starts with an implicit MoveTo at (x, y); build it up further with pdf_path_line_to() / pdf_path_bezier_to() / pdf_path_close(), then set styling via pdf_path_set_stroke() / pdf_path_set_fill() / pdf_path_set_draw_mode().

Usage

pdf_path_new(page, x = 0, y = 0)

Arguments

page

A pdfium_page from pdf_page_load(). Parent doc must be readwrite.

x, y

Numeric scalars — starting point in PDF user-space points (origin at the page's bottom-left). Default 0, 0.

Value

The new pdfium_obj (type "path"), inserted on the page. The parent page's dirty mark is set.