@embedpdf/core-geometry 3.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +192 -0
- package/dist/index.cjs +423 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +343 -0
- package/dist/index.d.ts +343 -0
- package/dist/index.js +398 -0
- package/dist/index.js.map +1 -0
- package/package.json +38 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
//#region src/index.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* @embedpdf/core-geometry — the viewer's pure 2D coordinate primitives.
|
|
4
|
+
*
|
|
5
|
+
* The bottom of the pyramid: stage-core (layout), plugin-stage (`pageToWorld`),
|
|
6
|
+
* and every framework adapter (`toPagePoint` hit-testing) all sit on these.
|
|
7
|
+
* Zero dependencies, DOM-free, serializable — Rust-portable.
|
|
8
|
+
*
|
|
9
|
+
* The page-rotation transforms are the reason this package exists: the same
|
|
10
|
+
* quarter-turn maps content↔box in BOTH directions, and that one rule must not
|
|
11
|
+
* be hand-written (and drift, or be bug-fixed in only one of four adapters).
|
|
12
|
+
*/
|
|
13
|
+
interface Point {
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
}
|
|
17
|
+
interface Size {
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
}
|
|
21
|
+
/** Viewer-side rect: top-left origin, y-down (view/page-point convention — NOT the
|
|
22
|
+
* engine's bottom-left PDF rect). */
|
|
23
|
+
interface Rect {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The bounding box of a set of rects (null for the empty set). Space-
|
|
31
|
+
* agnostic: works on any y-down `{x,y,width,height}` rects — search hit
|
|
32
|
+
* bounds, selection line-merge unions, multi-quad annotation extents.
|
|
33
|
+
*/
|
|
34
|
+
declare function boundsOfRects(rects: readonly Rect[]): Rect | null;
|
|
35
|
+
/**
|
|
36
|
+
* Intersection of two y-down rects — zero-sized (width/height 0, origin at
|
|
37
|
+
* the would-be corner) when disjoint, so callers can test `width > 0`
|
|
38
|
+
* without a null branch. Space-agnostic like {@link boundsOfRects}: view-px
|
|
39
|
+
* viewport ∩ footprint, page-point visibility ∩ tile footprints, ….
|
|
40
|
+
*/
|
|
41
|
+
declare function intersectRects(a: Rect, b: Rect): Rect;
|
|
42
|
+
/**
|
|
43
|
+
* Quarter-turn display rotation, degrees clockwise. The viewer-side notion of a
|
|
44
|
+
* page's on-screen rotation — the TOTAL = (document /Rotate + any view
|
|
45
|
+
* rotation), resolved by the shell. Structurally identical to the engine's
|
|
46
|
+
* `PageRotation`, so the two interoperate without this package depending on the
|
|
47
|
+
* engine.
|
|
48
|
+
*/
|
|
49
|
+
type PageRotation = 0 | 90 | 180 | 270;
|
|
50
|
+
/**
|
|
51
|
+
* Reserved chrome real estate around a page, one thickness per side (screen px
|
|
52
|
+
* in the shell; world units in the pure layout). The page content sits inset
|
|
53
|
+
* by these; the bands hold box-space chrome (labels, buttons, rails) that does
|
|
54
|
+
* not rotate. The layout reserves the matching space so nothing overlaps.
|
|
55
|
+
*/
|
|
56
|
+
interface PageFrame {
|
|
57
|
+
top: number;
|
|
58
|
+
right: number;
|
|
59
|
+
bottom: number;
|
|
60
|
+
left: number;
|
|
61
|
+
}
|
|
62
|
+
declare const NO_FRAME: PageFrame;
|
|
63
|
+
/** True for the quarter-turns that swap a page's width and height. */
|
|
64
|
+
declare function isQuarterTurn(rotation: PageRotation): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Compose two quarter-turn rotations (mod 360). THE way the shell resolves a
|
|
67
|
+
* page's TOTAL display rotation — `addRotations(page /Rotate, view rotation)`
|
|
68
|
+
* — so the wrap arithmetic is never hand-written (and drift) per call site.
|
|
69
|
+
*/
|
|
70
|
+
declare function addRotations(a: PageRotation, b: PageRotation): PageRotation;
|
|
71
|
+
/**
|
|
72
|
+
* Snap a view-px value to the device pixel grid: round to a whole device pixel,
|
|
73
|
+
* back to view px. Used for a page's screen POSITION so a CSS-rotated page lands
|
|
74
|
+
* on the grid (no sub-pixel anti-aliased fringe). The shell never hand-rounds.
|
|
75
|
+
*/
|
|
76
|
+
declare function snapToDevice(value: number, dpr: number): number;
|
|
77
|
+
/** A page's on-screen footprint: width and height swapped for quarter-turns. */
|
|
78
|
+
declare function displaySize(content: Size, rotation: PageRotation): Size;
|
|
79
|
+
/**
|
|
80
|
+
* The engine's `kind:'width'` height rule, replicated EXACTLY so the viewer can
|
|
81
|
+
* predict the rendered bitmap's height up front — the page box is sized to it,
|
|
82
|
+
* so the box matches the bitmap with no reflow and no 1px seam.
|
|
83
|
+
*
|
|
84
|
+
* Mirrors `PageRenderReader.resolveDeviceSize` (engine-services): we render the
|
|
85
|
+
* page UN-rotated (CSS applies the rotation), so there is no width/height swap
|
|
86
|
+
* here — `pageSize` is the page's own points. MUST stay in lockstep with that
|
|
87
|
+
* function; the round-trip test in the render plugin asserts they agree.
|
|
88
|
+
*/
|
|
89
|
+
declare function deviceHeightForWidth(pageSize: Size, deviceWidth: number): number;
|
|
90
|
+
/**
|
|
91
|
+
* The single per-page bridge between the viewer's three coordinate spaces. NB:
|
|
92
|
+
* these are all VIEWER spaces — top-left origin, y-down. They are NOT the
|
|
93
|
+
* engine's PDF user space (`Pdf*`, bottom-left origin, y-up); the engine→content
|
|
94
|
+
* hop (the y-flip + crop offset) is a separate matrix (`pageGeometry`).
|
|
95
|
+
*
|
|
96
|
+
* content space page-local points, top-left, y-down — un-rotated page frame
|
|
97
|
+
* view space platform logical px (web: CSS px) — layout, DOM, pointer events
|
|
98
|
+
* device space physical pixels — the rendered bitmap
|
|
99
|
+
*
|
|
100
|
+
* PAGE-LOCAL by design: it knows this page's own box, NOT where the page sits in
|
|
101
|
+
* the scene. Placement (camera/layout) stays on `VisiblePage.{x,y}` and positions
|
|
102
|
+
* the page container; the transform converts everything INSIDE that container. So
|
|
103
|
+
* it is camera/pan-invariant — it only changes on zoom / rotation / contentScale
|
|
104
|
+
* / dpr, which makes it cheap to memoize.
|
|
105
|
+
*
|
|
106
|
+
* Every plugin and framework adapter consumes THIS — never `x * scale`, never
|
|
107
|
+
* `pageToWorld()∘toScreen()`, never `* dpr`. New plugins (annotations, search,
|
|
108
|
+
* forms) do no coordinate math; new platforms (iOS/Android) inject a different
|
|
109
|
+
* `scale` and reuse all of it.
|
|
110
|
+
*/
|
|
111
|
+
interface PageTransform {
|
|
112
|
+
/**
|
|
113
|
+
* The page's TOTAL display rotation (document /Rotate + any view rotation) —
|
|
114
|
+
* the same value the transform's matrices were built from, exposed so
|
|
115
|
+
* consumers that need the quarter-turn itself (an upright-placement rule, a
|
|
116
|
+
* pointer sample) read it HERE instead of re-deriving it from the matrix.
|
|
117
|
+
*/
|
|
118
|
+
readonly rotation: PageRotation;
|
|
119
|
+
/** Display footprint in VIEW px (device-snapped) — the page container's size.
|
|
120
|
+
* Width↔height already swapped for quarter-turns. */
|
|
121
|
+
readonly viewWidth: number;
|
|
122
|
+
readonly viewHeight: number;
|
|
123
|
+
/** The UN-rotated content box in VIEW px — the size of the wrapper the bitmap
|
|
124
|
+
* and content-space overlays live in (before the wrapper's CSS rotation). */
|
|
125
|
+
readonly contentWidth: number;
|
|
126
|
+
readonly contentHeight: number;
|
|
127
|
+
/** Render the (un-rotated) bitmap at EXACTLY this — `viewport: {kind:'width', width: deviceWidth}`.
|
|
128
|
+
* Integer device px; `deviceHeight` is the engine's exact derived height. */
|
|
129
|
+
readonly deviceWidth: number;
|
|
130
|
+
readonly deviceHeight: number;
|
|
131
|
+
/** Device px per PDF point (uniform). */
|
|
132
|
+
readonly renderScale: number;
|
|
133
|
+
/** VIEW px per PDF point (uniform, device-snapped) — the one factor for
|
|
134
|
+
* screen-constant chrome: content units = CSS px ÷ `viewScale`. */
|
|
135
|
+
readonly viewScale: number;
|
|
136
|
+
/**
|
|
137
|
+
* View px per PDF point at 100% ZOOM — the page's physical baseline:
|
|
138
|
+
* `viewUnitsPerPoint × userUnit` (web: 96/72 × `/UserUnit`, so 100% maps to
|
|
139
|
+
* inches on screen, Acrobat-style). What "100%" MEANS for this page.
|
|
140
|
+
*/
|
|
141
|
+
readonly baseScale: number;
|
|
142
|
+
/**
|
|
143
|
+
* The page's zoom RELATIVE to its 100% baseline (`viewScale / baseScale`,
|
|
144
|
+
* dimensionless; exactly 1 at 100% for any `userUnit`). THE number
|
|
145
|
+
* zoom-relative policies consume — e.g. the `/F` NoZoom exemption clamps
|
|
146
|
+
* its body to `zoom ≤ 1`. Distinct from `viewScale` (a units conversion).
|
|
147
|
+
*/
|
|
148
|
+
readonly zoom: number;
|
|
149
|
+
/** Content point → UN-rotated content view px. For overlays INSIDE the rotated
|
|
150
|
+
* content wrapper (markers, annotations) — they ride the wrapper's rotation,
|
|
151
|
+
* so they place in content space and only scale here. */
|
|
152
|
+
pageToContent(p: Point): Point;
|
|
153
|
+
/** Content point → page-local view px in the DISPLAY box (rotation applied). For
|
|
154
|
+
* footprint-space layers (outside the wrapper). */
|
|
155
|
+
pageToView(p: Point): Point;
|
|
156
|
+
/** Content rect → its axis-aligned view-px rect (exact for quarter-turns). */
|
|
157
|
+
pageToViewRect(r: Rect): Rect;
|
|
158
|
+
/** Inverse — display-box view px (box-local) → content point. Hit-testing. */
|
|
159
|
+
viewToPage(p: Point): Point;
|
|
160
|
+
/** Inverse of {@link pageToViewRect}: display-box view-px rect → its content
|
|
161
|
+
* AABB (exact for quarter-turns). The visibility primitive — projecting a
|
|
162
|
+
* viewport rect into page points is THIS, never per-adapter corner math. */
|
|
163
|
+
viewToPageRect(r: Rect): Rect;
|
|
164
|
+
/** CSS `matrix()` mapping content space → this page's display box. Drop it on
|
|
165
|
+
* a footprint-space layer (`transform`, `transform-origin: 0 0`) and place
|
|
166
|
+
* children in content points — rotation + scale handled for free. */
|
|
167
|
+
readonly cssMatrix: string;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Build a page's transform from its intrinsic size + the platform/view scale.
|
|
171
|
+
* `scale` is VIEW px per PDF point (the shell composes it: `viewUnitsPerPoint ×
|
|
172
|
+
* contentScale × zoom`); `dpr` is device px per view px. Device dimensions snap
|
|
173
|
+
* to the grid (crisp, no rotation fringe) and follow the engine's width rule
|
|
174
|
+
* (box == bitmap, no reflow).
|
|
175
|
+
*/
|
|
176
|
+
declare function pageTransform(input: {
|
|
177
|
+
/** Un-rotated page size in PDF points. */
|
|
178
|
+
pageSize: Size;
|
|
179
|
+
rotation: PageRotation;
|
|
180
|
+
/** View px per PDF point = viewUnitsPerPoint × contentScale × zoom. */
|
|
181
|
+
scale: number;
|
|
182
|
+
/**
|
|
183
|
+
* View px per PDF point at 100% zoom (`viewUnitsPerPoint × userUnit`) — the
|
|
184
|
+
* page's physical baseline, so `zoom = viewScale / baseScale` reads as
|
|
185
|
+
* "percent of Acrobat's 100%". Default = `scale`, i.e. zoom ≈ 1: headless /
|
|
186
|
+
* standalone callers stay neutral unless they declare a baseline.
|
|
187
|
+
*/
|
|
188
|
+
baseScale?: number;
|
|
189
|
+
/** Device px per view px (web: devicePixelRatio). */
|
|
190
|
+
dpr: number;
|
|
191
|
+
}): PageTransform;
|
|
192
|
+
/**
|
|
193
|
+
* The coordinate spaces a viewer touches. `pdf` is the engine's PDF user space
|
|
194
|
+
* (y-up, origin at the crop box bottom-left); the rest are viewer-local, y-down.
|
|
195
|
+
*/
|
|
196
|
+
type Space = 'pdf' | 'content' | 'view' | 'screen';
|
|
197
|
+
/**
|
|
198
|
+
* Phantom space brand. It is OPTIONAL so plain `{ x, y }` / `{ x, y, w, h }`
|
|
199
|
+
* literals stay assignable day-to-day (terse), but a value EXPLICITLY tagged
|
|
200
|
+
* with the wrong space is rejected — and `Mat2D<From, To>` enforces the hop at
|
|
201
|
+
* the matrix, so you cannot `applyRect` a `pdf` rect with a `content→view`
|
|
202
|
+
* matrix. The brand is type-only; it carries no runtime field.
|
|
203
|
+
*/
|
|
204
|
+
interface SpaceBrand<S extends Space> {
|
|
205
|
+
readonly __space?: S;
|
|
206
|
+
}
|
|
207
|
+
/** A point tagged with its coordinate space. */
|
|
208
|
+
type PointIn<S extends Space> = Point & SpaceBrand<S>;
|
|
209
|
+
/**
|
|
210
|
+
* An axis-aligned rect tagged with its space, as min-corner + positive extent:
|
|
211
|
+
* `(x, y)` is the corner with the smallest coordinates and `(x+width, y+height)`
|
|
212
|
+
* the largest. In `pdf` space (y-up) that corner is bottom-left (`x=left`,
|
|
213
|
+
* `y=bottom`); in the y-down viewer spaces it is top-left.
|
|
214
|
+
*/
|
|
215
|
+
type RectIn<S extends Space> = Rect & SpaceBrand<S>;
|
|
216
|
+
/**
|
|
217
|
+
* Four POSITIONAL points (no corner semantics) — the viewer twin of the engine's
|
|
218
|
+
* `PdfQuad`. Use this (via {@link applyQuad}) for rotatable/skewed content where
|
|
219
|
+
* an axis-aligned rect would lie.
|
|
220
|
+
*/
|
|
221
|
+
interface Quad {
|
|
222
|
+
p1: Point;
|
|
223
|
+
p2: Point;
|
|
224
|
+
p3: Point;
|
|
225
|
+
p4: Point;
|
|
226
|
+
}
|
|
227
|
+
/** A quad tagged with its coordinate space. */
|
|
228
|
+
type QuadIn<S extends Space> = Quad & SpaceBrand<S>;
|
|
229
|
+
/**
|
|
230
|
+
* A 2D affine transform from space `From` to space `To`, stored as the six
|
|
231
|
+
* numbers `[a, b, c, d, e, f]`. The phantom `From`/`To` make the compiler track
|
|
232
|
+
* which spaces a matrix bridges, so composition and application can only be
|
|
233
|
+
* wired up in the one correct order.
|
|
234
|
+
*/
|
|
235
|
+
type Mat2D<From extends Space = Space, To extends Space = Space> = readonly [number, number, number, number, number, number] & {
|
|
236
|
+
readonly __from?: From;
|
|
237
|
+
readonly __to?: To;
|
|
238
|
+
};
|
|
239
|
+
/** The identity transform within a single space. */
|
|
240
|
+
declare function identity<S extends Space>(): Mat2D<S, S>;
|
|
241
|
+
/**
|
|
242
|
+
* Compose two matrices: `compose(m, n)` applies `n` first, then `m` (matrix
|
|
243
|
+
* product `m · n`). The shared middle space `B` must line up, so the type system
|
|
244
|
+
* rejects composing mismatched hops.
|
|
245
|
+
*/
|
|
246
|
+
declare function compose<A extends Space, B extends Space, C extends Space>(m: Mat2D<B, C>, n: Mat2D<A, B>): Mat2D<A, C>;
|
|
247
|
+
/** Invert a transform — `invert(pdfToView)` is `viewToPdf`, i.e. hit-testing for free. */
|
|
248
|
+
declare function invert<F extends Space, T extends Space>(m: Mat2D<F, T>): Mat2D<T, F>;
|
|
249
|
+
/** Apply a transform to a point. */
|
|
250
|
+
declare function applyPoint<F extends Space, T extends Space>(m: Mat2D<F, T>, p: PointIn<F>): PointIn<T>;
|
|
251
|
+
/**
|
|
252
|
+
* Apply a transform to a rect, returning the axis-aligned bounding box of the
|
|
253
|
+
* four transformed corners. EXACT for translate/scale/quarter-turn (every page
|
|
254
|
+
* transform `pageGeometry` produces); lossy under skew — use {@link applyQuad}
|
|
255
|
+
* for content that can be rotated off-axis.
|
|
256
|
+
*/
|
|
257
|
+
declare function applyRect<F extends Space, T extends Space>(m: Mat2D<F, T>, r: RectIn<F>): RectIn<T>;
|
|
258
|
+
/** Apply a transform to a quad, preserving orientation (maps the four points). */
|
|
259
|
+
declare function applyQuad<F extends Space, T extends Space>(m: Mat2D<F, T>, q: QuadIn<F>): QuadIn<T>;
|
|
260
|
+
/**
|
|
261
|
+
* A `Mat2D` IS a CSS `matrix()` — the six numbers are identical. Drop the result
|
|
262
|
+
* on a footprint-space layer (`transform`, `transform-origin: 0 0`) and place
|
|
263
|
+
* children in the source space; the rotation + scale are handled for free.
|
|
264
|
+
*/
|
|
265
|
+
declare function matrixToCss(m: Mat2D): string;
|
|
266
|
+
/** Translate within a space. */
|
|
267
|
+
declare function translate<S extends Space>(tx: number, ty: number): Mat2D<S, S>;
|
|
268
|
+
/** Scale about the space origin. */
|
|
269
|
+
declare function scale<S extends Space>(sx: number, sy: number): Mat2D<S, S>;
|
|
270
|
+
/** Rotate about the space origin (radians; clockwise in y-down content space). */
|
|
271
|
+
declare function rotate<S extends Space>(rad: number): Mat2D<S, S>;
|
|
272
|
+
/** Rotate about an arbitrary pivot: `T(c) · R(rad) · T(-c)`. */
|
|
273
|
+
declare function rotateAbout<S extends Space>(c: PointIn<S>, rad: number): Mat2D<S, S>;
|
|
274
|
+
/** Scale about an arbitrary anchor: `T(a) · S(sx, sy) · T(-a)`. */
|
|
275
|
+
declare function scaleAbout<S extends Space>(a: PointIn<S>, sx: number, sy: number): Mat2D<S, S>;
|
|
276
|
+
/** The rotation angle (radians) encoded in a matrix — `atan2(b, a)`. Positive is
|
|
277
|
+
* clockwise in y-down content space (the inverse of {@link rotate}). */
|
|
278
|
+
declare function angleOf(m: Mat2D): number;
|
|
279
|
+
/**
|
|
280
|
+
* The page's scale + integer quarter-turn as a `Mat2D`: a content point maps to
|
|
281
|
+
* its place in the rotated DISPLAY box. `scale` is output units per content
|
|
282
|
+
* point; `boxW`/`boxH` are the UN-rotated content's extents in those same output
|
|
283
|
+
* units, and the offsets keep the footprint in the box's positive quadrant
|
|
284
|
+
* (origin at the box top-left).
|
|
285
|
+
*
|
|
286
|
+
* THE single encoding of the quarter-turn — `pageTransform` (view px),
|
|
287
|
+
* `pageGeometry` (the `content→view` hop), and `pageToWorld` (world units) all
|
|
288
|
+
* build on this one function, so the rotation can never drift between them.
|
|
289
|
+
*/
|
|
290
|
+
declare function rotateScaleMatrix(scale: number, boxW: number, boxH: number, rotation: PageRotation): Mat2D;
|
|
291
|
+
/**
|
|
292
|
+
* The per-page geometry input. Structurally a subset of the engine's
|
|
293
|
+
* `PageLayout` (so a layout can be passed straight in), but defined here to keep
|
|
294
|
+
* this package dependency-free — the same reason {@link PageRotation} is a
|
|
295
|
+
* structural twin of the engine's rotation.
|
|
296
|
+
*/
|
|
297
|
+
interface PageGeometryInput {
|
|
298
|
+
/** Effective crop box in PDF user space (y-up edges); origin preserved, so
|
|
299
|
+
* `left`/`bottom` may be non-zero or negative. */
|
|
300
|
+
crop: {
|
|
301
|
+
left: number;
|
|
302
|
+
bottom: number;
|
|
303
|
+
right: number;
|
|
304
|
+
top: number;
|
|
305
|
+
};
|
|
306
|
+
/** Persistent page rotation (the document's `/Rotate`). */
|
|
307
|
+
rotation: PageRotation;
|
|
308
|
+
/** PDF `userUnit` (§14.11.6): scales PDF points into the layout. 1 for most docs. */
|
|
309
|
+
userUnit: number;
|
|
310
|
+
}
|
|
311
|
+
/** The matrices bridging one page's spaces — every other matrix composes from these. */
|
|
312
|
+
interface PageGeometry {
|
|
313
|
+
/** PDF user space (y-up, crop-relative) → content space (y-down, crop top-left, unscaled points). */
|
|
314
|
+
readonly pdfToContent: Mat2D<'pdf', 'content'>;
|
|
315
|
+
/** Content → view: scale (zoom × userUnit) + the page's quarter-turn rotation. */
|
|
316
|
+
readonly contentToView: Mat2D<'content', 'view'>;
|
|
317
|
+
/** PDF → view, precomposed. */
|
|
318
|
+
readonly pdfToView: Mat2D<'pdf', 'view'>;
|
|
319
|
+
/** View → PDF, the inverse — hit-testing for free. */
|
|
320
|
+
readonly viewToPdf: Mat2D<'view', 'pdf'>;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* PDF user space (y-up, origin = crop bottom-left) → content space (y-down,
|
|
324
|
+
* origin = crop top-left, unscaled points). THE single encoding of the engine→
|
|
325
|
+
* content y-flip + crop offset: `pageGeometry` composes its `pdfToContent` from
|
|
326
|
+
* this, and pure annotation geometry (content-space editing) reuses it too, so
|
|
327
|
+
* the rule can never be hand-written twice and drift.
|
|
328
|
+
*/
|
|
329
|
+
declare function pdfToContentMatrix(crop: {
|
|
330
|
+
left: number;
|
|
331
|
+
top: number;
|
|
332
|
+
}): Mat2D<'pdf', 'content'>;
|
|
333
|
+
/**
|
|
334
|
+
* Build a page's space matrices from its crop box, rotation, and `userUnit` plus
|
|
335
|
+
* the viewer `zoom`. This is the ONE function that knows the y-flip, crop origin,
|
|
336
|
+
* `userUnit`, and rotation; everything else composes from its output. The engine
|
|
337
|
+
* never emits these — they bake in viewer state (zoom, later scroll/dpr) — so the
|
|
338
|
+
* boundary stays clean: engine owns `Pdf*` truth, the viewer composes the rest.
|
|
339
|
+
*/
|
|
340
|
+
declare function pageGeometry(input: PageGeometryInput, zoom: number): PageGeometry;
|
|
341
|
+
//#endregion
|
|
342
|
+
export { Mat2D, NO_FRAME, PageFrame, PageGeometry, PageGeometryInput, PageRotation, PageTransform, Point, PointIn, Quad, QuadIn, Rect, RectIn, Size, Space, addRotations, angleOf, applyPoint, applyQuad, applyRect, boundsOfRects, compose, deviceHeightForWidth, displaySize, identity, intersectRects, invert, isQuarterTurn, matrixToCss, pageGeometry, pageTransform, pdfToContentMatrix, rotate, rotateAbout, rotateScaleMatrix, scale, scaleAbout, snapToDevice, translate };
|
|
343
|
+
//# sourceMappingURL=index.d.cts.map
|