mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 03:20:46 +02:00
Add Crop to V2 (#4471)
# Description of Changes Add Crop to V2 --------- Co-authored-by: EthanHealy01 <[email protected]> Co-authored-by: Connor Yoh <[email protected]> Co-authored-by: ConnorYoh <[email protected]>
This commit is contained in:
co-authored by
EthanHealy01
Connor Yoh
ConnorYoh
parent
f6df414425
commit
c76edebf0f
@@ -0,0 +1,12 @@
|
||||
import { PAGE_SIZES } from "./pageSizeConstants";
|
||||
|
||||
// Default crop area (covers entire page)
|
||||
export const DEFAULT_CROP_AREA = {
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: PAGE_SIZES.A4.width,
|
||||
height: PAGE_SIZES.A4.height,
|
||||
} as const;
|
||||
|
||||
|
||||
export type ResizeHandle = 'nw' | 'ne' | 'sw' | 'se' | 'n' | 'e' | 's' | 'w' | null;
|
||||
@@ -0,0 +1,8 @@
|
||||
// Default PDF page sizes in points (1 point = 1/72 inch)
|
||||
export const PAGE_SIZES = {
|
||||
A4: { width: 595, height: 842 },
|
||||
LETTER: { width: 612, height: 792 },
|
||||
A3: { width: 842, height: 1191 },
|
||||
A5: { width: 420, height: 595 },
|
||||
LEGAL: { width: 612, height: 1008 },
|
||||
} as const;
|
||||
Reference in New Issue
Block a user