forked from joshmarinacci/node-pureimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
33 lines (32 loc) · 753 Bytes
/
Copy pathtypes.ts
File metadata and controls
33 lines (32 loc) · 753 Bytes
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
import type { Point } from "./point.js";
/**
* Enum for path commands (used for encoding and decoding lines, curves etc. to and from a path)
*/
export enum PATH_COMMAND {
MOVE = "m",
LINE = "l",
QUADRATIC_CURVE = "q",
BEZIER_CURVE = "b",
}
export type RGBA = [number, number, number, number];
export type RGB = [number, number, number];
export type TextAlign = "start" | "end" | "left" | "center" | "right";
export type TextBaseline = "top" | "middle" | "alphabetic" | "bottom";
export type PathCmd = {
0: PATH_COMMAND;
1: Point;
2?: Point;
3?: Point;
};
export type MinimumBounds = {
x: number;
y: number;
x2: number;
y2: number;
};
export type RoundRectCorners = {
tl: number;
tr: number;
br: number;
bl: number;
};