Skip to content

feat: Drawing primitives on PdfWriter (Block A) #7

@ralflang

Description

@ralflang

Drawing Primitives on PdfWriter

  • Towards Feature Parity
  • Prerequisite for Block B

Expose line(), rect(), and circle() as convenience methods on PdfWriter.
These delegate to raw PDF operators (moveTo/lineTo/curveTo/rect + stroke/fill) in the per-page content string. This mirrors the legacy Writer API.
Accepts a ShapeStyle parameter (stroke, fill, both) like the legacy $style arg.

TODO: Double check if we should depart more from the legacy api for the sake of modern DX

Tests: Operator-level assertions for each shape, fill+stroke combos.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions