@daign/2d-graphics
Version:
Two dimensional graphics library that implements the daign-2d-pipeline.
31 lines (30 loc) • 1.05 kB
TypeScript
import { Group } from '../basic-elements/group';
import { ITargetContext } from '../iTargetContext';
import { ControlLayer } from './controlLayer';
import { SelectionManager } from './selectionManager';
import { Viewport } from './viewport';
import { UpdateManager } from './updateManager';
/**
* Application consisting of a drawing layer and a control layer.
*/
export declare class Application extends Group {
selectionManager: SelectionManager;
updateManager: UpdateManager;
drawingLayer: Viewport;
controlLayer: ControlLayer | null;
/**
* Constructor.
* @param context - The target context.
* @param interactive - Whether the application is responding to user actions. Default false.
*/
constructor(context: ITargetContext, interactive?: boolean);
/**
* Zoom and pan content to fit viewport.
* @param margin - The margin to leave around the content. Optional.
*/
fitToContent(margin?: number): void;
/**
* Redraw and render the application.
*/
redraw(): void;
}