Files
image-studio/editor/transform.ts
2026-07-03 16:12:26 +02:00

22 lines
472 B
TypeScript

import type { Rect, Vec2D } from "@core/geometry";
import type { ArtboardId, LayerId } from "@core/id";
export type TransformHandle = "body" | "n" | "ne" | "e" | "se" | "s" | "sw" | "w" | "nw";
export type TransformTarget =
| {
type: "artboard";
id: ArtboardId;
}
| {
type: "layer";
id: LayerId;
};
export type TransformSession = {
target: TransformTarget;
handle: TransformHandle;
startPoint: Vec2D;
initialBounds: Rect;
};