Overview
graphitepdf-primitives provides the common low-level vocabulary used by higher-level GraphitePDF crates without pulling in layout or PDF-specific policy.
Scope
graphitepdf-primitives contains:
- document element tags such as
Document,Page,View, andText - geometry types such as
Bounds,Point, andSize - basic units and color types such as
PtandColor
Installation
API Summary
| Category | Items |
|---|---|
| Element tags | Document, Page, View, Text |
| Geometry | Bounds, Point, Size |
| Units and color | Pt, Color |
Example
use ;
Design Principles
- keep foundational APIs renderer-agnostic
- expose explicit data structures over implicit conversions
- avoid unnecessary dependencies
- make shared document and layout types easy to reuse
Role In GraphitePDF
This crate sits at the base of the GraphitePDF stack and gives downstream crates a stable set of shared low-level types.
License
MIT