UNPKG

@gorpacrate/core-graphics

Version:

A core library for creating shape-based graphic editors

40 lines (39 loc) 1.83 kB
import * as React from 'react'; import { IBoundingBox, IShapeData, IShapeDeclaration, IShapesDeclarations } from '../../declarations'; import { IPersistedHistoryEvent } from '../../history/history-event'; import { IEditorState } from '../editor-state'; export { IPersistedHistoryEvent }; export { IEditorState }; export declare const LINE = "LINE"; export declare const LINE_IGNORE_GRID = "LINE_IGNORE_GRID"; export declare function getRectBoundingBox(shapeData: IShapeData): IBoundingBox; export declare function draw2Points({ startX, startY }: { startX: number; startY: number; }): IterableIterator<{ x: number; y: number; }[]>; export declare const STROKE_WIDTH = "STROKE_WIDTH"; export declare const STROKE_COLOR = "STROKE_COLOR"; export declare type ILineMouseHandler = React.MouseEventHandler<SVGLineElement>; export declare const LINE_DECLARATION: IShapeDeclaration; export declare const LINE_IGNORE_GRID_DECLARATION: IShapeDeclaration; export declare const SHAPES_DECLARATIONS: IShapesDeclarations; export declare const ALICE = "ALICE"; export declare const BOB = "BOB"; export declare const EVE = "EVE"; export declare const ALICE_LINE_ID = "0"; export declare const BOB_LINE_ID = "1"; export declare const EVE_LINE_ID = "2"; export declare const ALICE_LINE: IShapeData; export declare const ALICE_UPDATED_LINE: IShapeData; export declare const BOB_LINE: IShapeData; export declare const EVE_LINE: IShapeData; declare const _default: IPersistedHistoryEvent[]; export default _default; export declare const ALICE_BOB_LINES: IPersistedHistoryEvent[]; export declare const ALICE_BOB_EVE_LINES: IPersistedHistoryEvent[]; export declare const ALICE_BOB_LINES_EDITOR_STATE: IEditorState; export declare const ALICE_BOB_EVE_LINES_EDITOR_STATE: IEditorState; export declare const EMPTY_ALICE_STATE: IEditorState;