forked from ApryseSDK/pdftron-react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AnnotOptions.ts
105 lines (86 loc) · 1.86 KB
/
AnnotOptions.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
import {Config} from '../Config/Config';
export interface Annotation {
id: string;
pageNumber?: number;
type?: string;
pageRect?: Rect;
screenRect?: Rect;
}
export interface Rect {
height?: number;
width?: number;
x1: number;
y1: number;
x2: number;
y2: number;
}
export type CropBox = Required<Rect>;
export interface Color {
red: number;
green: number;
blue: number;
}
export interface ColorWithAlpha {
red: number;
green: number;
blue: number;
alpha: number;
}
export type RotationDegree = 0 | 90 | 180 | 270;
export interface Field {
fieldName: string;
fieldType: string;
fieldValue?: string | boolean | number | undefined;
fieldHasAppearance?: boolean | undefined;
}
export interface Point {
x: number;
y: number;
pageNumber?: number;
}
export type Quad = [Point, Point, Point, Point];
export interface TextSelectionResult {
html: string;
unicode: string;
pageNumber: number;
quads: Array<Quad>;
}
export interface AnnotationFlag {
id: string;
pageNumber: number;
flag: Config.AnnotationFlags;
flagValue: boolean;
}
export interface AnnotationProperties {
rect?: Rect;
contents?: string;
subject?: string;
title?: string;
contentRect?: Rect;
customData?: object;
strokeColor?: Color;
}
export interface LinkPressData {
url: string;
}
export interface StickyNoteData {
id: string;
pageNumber: number;
type: string;
pageRect?: Rect;
screenRect?: Rect;
}
export type DrawnSignature = 0;
export type TypedSignature = 1;
export type ImageSignature = 2;
export type SignatureType = DrawnSignature | TypedSignature | ImageSignature;
export interface MatchQuad {
x1: number;
y1: number;
x2: number;
y3: number;
}
export interface Match {
pageNumber: number;
quads: MatchQuad;
}