UNPKG

@gorpacrate/core-graphics

Version:

A core library for creating shape-based graphic editors

25 lines (24 loc) 695 B
import { IShapeData, IShapeDeclaration } from '../declarations'; export declare const LINE = "LINE"; export declare const RECT = "RECT"; export declare const getRectBoundingBox: (shapeData: IShapeData) => { x1: number; y1: number; x2: number; y2: number; width: number; height: number; }; export declare function draw2Points({ startX, startY }: { startX: number; startY: number; }): IterableIterator<{ x: number; y: number; }[]>; export declare const LINE_DECLARATION: IShapeDeclaration; export declare const RECT_DECLARATION: IShapeDeclaration; export declare const SHAPES_DECLARATIONS: { [LINE]: IShapeDeclaration; [RECT]: IShapeDeclaration; };