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.
Drawing Primitives on PdfWriter
Expose
line(),rect(), andcircle()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.