// Generated by dts-bundle v0.7.3 export * from 'CanvasTools/CanvasTools/CanvasTools.Editor'; export * from 'CanvasTools/CanvasTools/CanvasTools.Filter'; export * from 'CanvasTools/CanvasTools/Core/Colors/Color'; export * from 'CanvasTools/CanvasTools/Core/Colors/HSLColor'; export * from 'CanvasTools/CanvasTools/Core/Colors/LABColor'; export * from 'CanvasTools/CanvasTools/Core/Colors/Palette'; export * from 'CanvasTools/CanvasTools/Core/Colors/RGBColor'; export * from 'CanvasTools/CanvasTools/Core/Colors/SRGBColor'; export * from 'CanvasTools/CanvasTools/Core/Colors/XYZColor'; export * from 'CanvasTools/CanvasTools/Core/ConfigurationManager'; export * from 'CanvasTools/CanvasTools/Core/CubicBezierControl'; export * from 'CanvasTools/CanvasTools/Core/CubicBezierIndex'; export * from 'CanvasTools/CanvasTools/Core/Point2D'; export * from 'CanvasTools/CanvasTools/Core/Rect'; export * from 'CanvasTools/CanvasTools/Core/RegionData'; export * from 'CanvasTools/CanvasTools/Core/Tag'; export * from 'CanvasTools/CanvasTools/Core/TagsDescriptor'; export * from 'CanvasTools/CanvasTools/Core/Utils/calculateLineSegments'; export * from 'CanvasTools/CanvasTools/Core/Utils/mapIndexRecord'; export * from 'CanvasTools/CanvasTools/Core/ZoomManager'; export * from 'CanvasTools/CanvasTools/Interface/IAnchorMixin'; export * from 'CanvasTools/CanvasTools/Interface/IBoundable'; export * from 'CanvasTools/CanvasTools/Interface/ICubicBezierControl'; export * from 'CanvasTools/CanvasTools/Interface/IEventDescriptor'; export * from 'CanvasTools/CanvasTools/Interface/IFreezable'; export * from 'CanvasTools/CanvasTools/Interface/IHideadble'; export * from 'CanvasTools/CanvasTools/Interface/ILineSegment'; export * from 'CanvasTools/CanvasTools/Interface/IMovable'; export * from 'CanvasTools/CanvasTools/Interface/IPoint2D'; export * from 'CanvasTools/CanvasTools/Interface/IRect'; export * from 'CanvasTools/CanvasTools/Interface/IRegionCallbacks'; export * from 'CanvasTools/CanvasTools/Interface/IRegionData'; export * from 'CanvasTools/CanvasTools/Interface/IRegionsManagerCallbacks'; export * from 'CanvasTools/CanvasTools/Interface/IResizable'; export * from 'CanvasTools/CanvasTools/Interface/ISelectorCallbacks'; export * from 'CanvasTools/CanvasTools/Interface/ISelectorSettings'; export * from 'CanvasTools/CanvasTools/Interface/ITag'; export * from 'CanvasTools/CanvasTools/Interface/ITagsDescriptor'; export * from 'CanvasTools/CanvasTools/Interface/ITagsUpdateOptions'; export * from 'CanvasTools/CanvasTools/Interface/IToolbarIcon'; export * from 'CanvasTools/CanvasTools/Interface/IZoomCallbacks'; export * from 'CanvasTools/CanvasTools/Interface/RegionDataType'; export * from 'CanvasTools/CanvasTools/Region/Component/AnchorsComponent'; export * from 'CanvasTools/CanvasTools/Region/Component/BezierController'; export * from 'CanvasTools/CanvasTools/Region/Component/DragComponent'; export * from 'CanvasTools/CanvasTools/Region/Component/MidpointComponent'; export * from 'CanvasTools/CanvasTools/Region/Component/RegionComponent'; export * from 'CanvasTools/CanvasTools/Region/Component/TagsComponent'; export * from 'CanvasTools/CanvasTools/Region/Path/AnchorsElement'; export * from 'CanvasTools/CanvasTools/Region/Path/MidpointElement'; export * from 'CanvasTools/CanvasTools/Region/Path/PathRegion'; export * from 'CanvasTools/CanvasTools/Region/Path/TagsElement'; export * from 'CanvasTools/CanvasTools/Region/Point/DragElement'; export * from 'CanvasTools/CanvasTools/Region/Point/PointRegion'; export * from 'CanvasTools/CanvasTools/Region/Point/TagsElement'; export * from 'CanvasTools/CanvasTools/Region/Polygon/AnchorsElement'; export * from 'CanvasTools/CanvasTools/Region/Polygon/DragElement'; export * from 'CanvasTools/CanvasTools/Region/Polygon/PolygonRegion'; export * from 'CanvasTools/CanvasTools/Region/Polygon/TagsElement'; export * from 'CanvasTools/CanvasTools/Region/Polyline/AnchorsElement'; export * from 'CanvasTools/CanvasTools/Region/Polyline/DragElement'; export * from 'CanvasTools/CanvasTools/Region/Polyline/PolylineRegion'; export * from 'CanvasTools/CanvasTools/Region/Polyline/TagsElement'; export * from 'CanvasTools/CanvasTools/Region/Rect/AnchorsElements'; export * from 'CanvasTools/CanvasTools/Region/Rect/DragElement'; export * from 'CanvasTools/CanvasTools/Region/Rect/RectRegion'; export * from 'CanvasTools/CanvasTools/Region/Rect/TagsElement'; export * from 'CanvasTools/CanvasTools/Region/Region'; export * from 'CanvasTools/CanvasTools/Region/RegionMenu'; export * from 'CanvasTools/CanvasTools/Region/RegionsManager'; export * from 'CanvasTools/CanvasTools/Selection/AreaSelector'; export * from 'CanvasTools/CanvasTools/Selection/Component/AlternatingCrossElement'; export * from 'CanvasTools/CanvasTools/Selection/Component/CrossElement'; export * from 'CanvasTools/CanvasTools/Selection/Component/Element'; export * from 'CanvasTools/CanvasTools/Selection/Component/MaskElement'; export * from 'CanvasTools/CanvasTools/Selection/Component/RectElement'; export * from 'CanvasTools/CanvasTools/Selection/Selectors/PointSelector'; export * from 'CanvasTools/CanvasTools/Selection/Selectors/PolygonSelector'; export * from 'CanvasTools/CanvasTools/Selection/Selectors/PolylineSelector'; export * from 'CanvasTools/CanvasTools/Selection/Selectors/RectCopySelector'; export * from 'CanvasTools/CanvasTools/Selection/Selectors/RectSelector'; export * from 'CanvasTools/CanvasTools/Selection/Selectors/Selector'; export * from 'CanvasTools/CanvasTools/Toolbar/Toolbar'; export * from 'CanvasTools/CanvasTools/Toolbar/ToolbarAction'; export * from 'CanvasTools/CanvasTools/Toolbar/ToolbarIcon'; export * from 'CanvasTools/CanvasTools/Toolbar/ToolbarSelect'; export * from 'CanvasTools/CanvasTools/Toolbar/ToolbarSelectIcon'; export * from 'CanvasTools/CanvasTools/Toolbar/ToolbarSeparator'; export * from 'CanvasTools/CanvasTools/Toolbar/ToolbarSwitchIcon'; export * from 'CanvasTools/CanvasTools/Toolbar/ToolbarTriggerIcon'; declare module 'CanvasTools/CanvasTools/CanvasTools.Editor' { import { FilterPipeline } from "CanvasTools/CanvasTools/CanvasTools.Filter"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { ZoomManager, ZoomProperties } from "CanvasTools/CanvasTools/Core/ZoomManager"; import { RegionManipulationFunction } from "CanvasTools/CanvasTools/Interface/IRegionCallbacks"; import { RegionSelectionFunction, RegionUpdateFunction } from "CanvasTools/CanvasTools/Interface/IRegionsManagerCallbacks"; import { PointSelectionNotifyFunction, SelectionConfirmFunction, SelectionNotifyFunction } from "CanvasTools/CanvasTools/Interface/ISelectorCallbacks"; import { ZoomUpdateFunction } from "CanvasTools/CanvasTools/Interface/IZoomCallbacks"; import { RegionsManager } from "CanvasTools/CanvasTools/Region/RegionsManager"; import { AreaSelector } from "CanvasTools/CanvasTools/Selection/AreaSelector"; import { ToolbarAction } from "CanvasTools/CanvasTools/Toolbar/ToolbarAction"; import { ToolbarItemType } from "CanvasTools/CanvasTools/Toolbar/ToolbarIcon"; export interface ToolbarIconDescription { type: ToolbarItemType; action?: ToolbarAction; iconFile?: string; tooltip?: string; actionCallback?: (action: string, rm: RegionsManager, sl: AreaSelector, zm: ZoomManager) => void; key?: string[]; width?: number; height?: number; activate?: boolean; } export class Editor { get api(): Editor & RegionsManager & AreaSelector & FilterPipeline & ZoomManager; get RM(): RegionsManager; get AS(): AreaSelector; get FP(): FilterPipeline; get ZM(): ZoomManager; set isModifyRegionOnlyMode(value: boolean); get isModifyRegionOnlyMode(): boolean; get getFrameSize(): [number, number]; static FullToolbarSet: ToolbarIconDescription[]; static RectToolbarSet: ToolbarIconDescription[]; autoResize: boolean; onRegionSelected: RegionSelectionFunction; onRegionMove: RegionUpdateFunction; onRegionMoveBegin: RegionUpdateFunction; onRegionMoveEnd: RegionUpdateFunction; onRegionDelete: RegionUpdateFunction; onManipulationBegin: RegionManipulationFunction; onManipulationEnd: RegionManipulationFunction; onSelectionBegin: SelectionNotifyFunction; onSelectionEnd: SelectionConfirmFunction; onNextSelectionPoint: PointSelectionNotifyFunction; onZoomEnd: ZoomUpdateFunction; constructor(container: HTMLDivElement); constructor(container: HTMLDivElement, areaSelector: AreaSelector, regionsManager: RegionsManager); constructor(container: HTMLDivElement, areaSelector: AreaSelector, regionsManager: RegionsManager, filterPipeline: FilterPipeline); constructor(container: HTMLDivElement, areaSelector?: AreaSelector, regionsManager?: RegionsManager, filterPipeline?: FilterPipeline, zoomProperties?: ZoomProperties); addToolbar(container: HTMLDivElement, toolbarSet: ToolbarIconDescription[], iconsPath: string, isVertical?: boolean): void; addContentSource(source: HTMLCanvasElement | HTMLImageElement | HTMLVideoElement): Promise; enablePathRegions(enable: boolean): void; resize(containerWidth: number, containerHeight: number): void; scaleRegionToSourceSize(regionData: RegionData, sourceWidth?: number, sourceHeight?: number): RegionData; scaleRegionToFrameSize(regionData: RegionData, sourceWidth?: number, sourceHeight?: number): RegionData; } } declare module 'CanvasTools/CanvasTools/CanvasTools.Filter' { export type FilterFunction = (canvas: HTMLCanvasElement) => Promise; export function InvertFilter(canvas: HTMLCanvasElement): Promise; export function GrayscaleFilter(canvas: HTMLCanvasElement): Promise; export function BlurDiffFilter(factor: number): FilterFunction; export function BrightnessFilter(brightness: number): FilterFunction; export function ContrastFilter(contrast: number): FilterFunction; export function SaturationFilter(saturation: number): FilterFunction; export class FilterPipeline { constructor(); addFilter(filter: FilterFunction): void; clearFilters(): void; applyToCanvas(canvas: HTMLCanvasElement): Promise; } } declare module 'CanvasTools/CanvasTools/Core/Colors/Color' { import { HSLColor } from "CanvasTools/CanvasTools/Core/Colors/HSLColor"; import { LABColor } from "CanvasTools/CanvasTools/Core/Colors/LABColor"; import { RGBColor } from "CanvasTools/CanvasTools/Core/Colors/RGBColor"; import { SRGBColor } from "CanvasTools/CanvasTools/Core/Colors/SRGBColor"; import { XYZColor } from "CanvasTools/CanvasTools/Core/Colors/XYZColor"; export class Color { get sRGB(): SRGBColor; get RGB(): RGBColor; get XYZ(): XYZColor; get LAB(): LABColor; get HSL(): HSLColor; constructor(srgb: SRGBColor); constructor(rgb: RGBColor); constructor(hsl: HSLColor); constructor(xyz: XYZColor); constructor(lab: LABColor); constructor(srgbCSSString: string); constructor(r: number, g: number, b: number); } } declare module 'CanvasTools/CanvasTools/Core/Colors/HSLColor' { import { SRGBColor } from "CanvasTools/CanvasTools/Core/Colors/SRGBColor"; export class HSLColor { get h(): number; get s(): number; get l(): number; constructor(h: number, s: number, l: number); toArray(): number[]; toCSSValues(): number[]; toCSSString(alpha?: number): string; toSRGB(): SRGBColor; } } declare module 'CanvasTools/CanvasTools/Core/Colors/LABColor' { import { RGBColor } from "CanvasTools/CanvasTools/Core/Colors/RGBColor"; import { SRGBColor } from "CanvasTools/CanvasTools/Core/Colors/SRGBColor"; import { XYZColor } from "CanvasTools/CanvasTools/Core/Colors/XYZColor"; export interface ILabColorPoint { a: number; b: number; } export class LABColor implements ILabColorPoint { get l(): number; get a(): number; get b(): number; constructor(l: number, a: number, b: number); distanceTo(color: LABColor): number; distanceTo_00(color: LABColor): number; distanceToGray(): number; toArray(): number[]; toXYZ(): XYZColor; toRGB(): RGBColor; toSRGB(): SRGBColor; } } declare module 'CanvasTools/CanvasTools/Core/Colors/Palette' { import { Color } from "CanvasTools/CanvasTools/Core/Colors/Color"; export interface IPaletteSettings { lightness: number; lightnessVariation: number; minGrayness: number; maxGrayness: number; granularity: number; abRange: number; } export class Palette { constructor(settings: IPaletteSettings); gamut(): Promise; swatches(colorsCount: number): Promise; more(swatches: Color[], colorsCount: number): Promise; swatchIterator(): AsyncIterableIterator; } } declare module 'CanvasTools/CanvasTools/Core/Colors/RGBColor' { import { LABColor } from "CanvasTools/CanvasTools/Core/Colors/LABColor"; import { SRGBColor } from "CanvasTools/CanvasTools/Core/Colors/SRGBColor"; import { XYZColor } from "CanvasTools/CanvasTools/Core/Colors/XYZColor"; export class RGBColor { get r(): number; get g(): number; get b(): number; constructor(r: number, g: number, b: number); toArray(): number[]; toXYZ(): XYZColor; toSRGB(): SRGBColor; toLAB(): LABColor; } } declare module 'CanvasTools/CanvasTools/Core/Colors/SRGBColor' { import { HSLColor } from "CanvasTools/CanvasTools/Core/Colors/HSLColor"; import { LABColor } from "CanvasTools/CanvasTools/Core/Colors/LABColor"; import { RGBColor } from "CanvasTools/CanvasTools/Core/Colors/RGBColor"; import { XYZColor } from "CanvasTools/CanvasTools/Core/Colors/XYZColor"; export class SRGBColor { static ParseHex(hex: string): SRGBColor; get r(): number; get g(): number; get b(): number; constructor(r: number, g: number, b: number); isValidColor(): boolean; truncate(): SRGBColor; toArray(): number[]; toCSSString(alpha?: number): string; toHex(alpha?: number): string; toHSL(): HSLColor; toXYZ(): XYZColor; toRGB(): RGBColor; toLAB(): LABColor; } } declare module 'CanvasTools/CanvasTools/Core/Colors/XYZColor' { import { LABColor } from "CanvasTools/CanvasTools/Core/Colors/LABColor"; import { RGBColor } from "CanvasTools/CanvasTools/Core/Colors/RGBColor"; import { SRGBColor } from "CanvasTools/CanvasTools/Core/Colors/SRGBColor"; export class XYZColor { static D65: XYZColor; static D50: XYZColor; get x(): number; get y(): number; get z(): number; constructor(x: number, y: number, z: number); toArray(): number[]; toRGB(): RGBColor; toSRGB(): SRGBColor; toLAB(): LABColor; } } declare module 'CanvasTools/CanvasTools/Core/ConfigurationManager' { export class ConfigurationManager { static isModifyRegionOnlyMode: boolean; static isPathRegionEnabled: boolean; } } declare module 'CanvasTools/CanvasTools/Core/CubicBezierControl' { import { ICubicBezierControl } from "CanvasTools/CanvasTools/Interface/ICubicBezierControl"; import { IRect } from "CanvasTools/CanvasTools/Interface/IRect"; import { Point2D } from "CanvasTools/CanvasTools/Core/Point2D"; export class CubicBezierControl { static BuildFromJSON({ c1, c2 }: ICubicBezierControl): CubicBezierControl; c1: Point2D; c2: Point2D; constructor({ c1, c2 }: ICubicBezierControl); boundToRect(r: IRect): CubicBezierControl; shift(dx: number, dy: number): void; copy(): CubicBezierControl; toString(): string; toJSON(): ICubicBezierControl; } } declare module 'CanvasTools/CanvasTools/Core/CubicBezierIndex' { import { ICubicBezierControl } from "CanvasTools/CanvasTools/Interface/ICubicBezierControl"; import { IPoint2D } from "CanvasTools/CanvasTools/Interface/IPoint2D"; import { IRect } from "CanvasTools/CanvasTools/Interface/IRect"; import { CubicBezierControl } from "CanvasTools/CanvasTools/Core/CubicBezierControl"; import { Point2D } from "CanvasTools/CanvasTools/Core/Point2D"; export class CubicBezierIndex implements Record { [index: number]: CubicBezierControl; static buildFromJSON(controls: Record | Record): CubicBezierIndex; constructor(controls?: Record); copy(): CubicBezierIndex; scale(scalePoint: (p: IPoint2D) => Point2D): CubicBezierIndex; move(movePoint: (p: IPoint2D) => Point2D): CubicBezierIndex; shift(dx: number, dy: number): CubicBezierIndex; boundToRect(rect: IRect): CubicBezierIndex; toJSON(): Record; forEach(fn: (control: CubicBezierControl, index: number) => void): void; } } declare module 'CanvasTools/CanvasTools/Core/Point2D' { import { IBoundable } from "CanvasTools/CanvasTools/Interface/IBoundable"; import { IMovable } from "CanvasTools/CanvasTools/Interface/IMovable"; import { IPoint2D } from "CanvasTools/CanvasTools/Interface/IPoint2D"; import { IRect } from "CanvasTools/CanvasTools/Interface/IRect"; export class Point2D implements IMovable, IBoundable { static BuildFromJSON(data: IPoint2D): Point2D; x: number; y: number; constructor(x: number, y: number); constructor(p: IPoint2D); move(x: number, y: number): void; move(point: IPoint2D): void; shift(dx: number, dy: number): void; boundToRect(r: IRect): Point2D; squareDistanceToPoint(p: Point2D): number; squareDistanceToLine(p1: Point2D, p2: Point2D): number; copy(): Point2D; toString(): string; toJSON(): IPoint2D; } } declare module 'CanvasTools/CanvasTools/Core/Rect' { import { IRect } from "CanvasTools/CanvasTools/Interface/IRect"; import { IResizable } from "CanvasTools/CanvasTools/Interface/IResizable"; export class Rect implements IResizable { static BuildFromJSON(data: IRect): Rect; width: number; height: number; constructor(width: number, height: number); resize(width: number, height: number): void; copy(): Rect; toString(): string; toJSON(): IRect; } } declare module 'CanvasTools/CanvasTools/Core/RegionData' { import { ICubicBezierControl } from "CanvasTools/CanvasTools/Interface/ICubicBezierControl"; import { ILineSegment } from "CanvasTools/CanvasTools/Interface/ILineSegment"; import { IMovable } from "CanvasTools/CanvasTools/Interface/IMovable"; import { IPoint2D } from "CanvasTools/CanvasTools/Interface/IPoint2D"; import { IRect } from "CanvasTools/CanvasTools/Interface/IRect"; import { IRegionData } from "CanvasTools/CanvasTools/Interface/IRegionData"; import { IResizable } from "CanvasTools/CanvasTools/Interface/IResizable"; import { RegionDataType } from "CanvasTools/CanvasTools/Interface/RegionDataType"; import { CubicBezierControl } from "CanvasTools/CanvasTools/Core/CubicBezierControl"; import { CubicBezierIndex } from "CanvasTools/CanvasTools/Core/CubicBezierIndex"; import { Point2D } from "CanvasTools/CanvasTools/Core/Point2D"; import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; export { RegionDataType }; export class RegionData implements IRegionData, IMovable, IResizable { static BuildPointRegionData(x: number, y: number): RegionData; static BuildRectRegionData(x: number, y: number, width: number, height: number): RegionData; static BuildPolygonRegionData(x: number, y: number, width: number, height: number, points: Point2D[]): RegionData; static BuildPathRegionData(x: number, y: number, width: number, height: number, points: IPoint2D[], bezierControls: Record): RegionData; static BuildFromJson(data: IRegionData): RegionData; protected corner: Point2D; protected regionRect: Rect; protected regionPoints: Point2D[]; protected regionBezierControls: CubicBezierIndex; protected regionType: RegionDataType; constructor(x: number, y: number, width: number, height: number, points?: Point2D[], type?: RegionDataType, bezierControls?: Record); get x(): number; set x(x: number); get y(): number; set y(y: number); get width(): number; set width(width: number); get height(): number; set height(height: number); get area(): number; get boundRect(): Rect; set boundRect(rect: Rect); get points(): Point2D[]; set points(points: Point2D[]); get bezierControls(): CubicBezierIndex; get type(): RegionDataType; move(point: IPoint2D): void; move(x: number, y: number): void; resize(width: number, height: number): void; setPoint(point: IPoint2D, index: number): void; splicePoints(start: number, deleteCount?: number, ...points: IPoint2D[]): void; setBezierControl(index: number, control: ICubicBezierControl): void; setBezierControls(controls: Record): void; deleteBezierControls(index: number | number[]): void; setPoints(points: IPoint2D[]): void; initFrom(regionData: IRegionData): void; boundToRect(rect: IRect): RegionData; scale(xfactor: number, yfactor: number): void; scale(factor: number): void; copy(): RegionData; getLineSegments(): ILineSegment[]; toString(): string; toPath(): string; toLinePathSegments(): string[]; toJSON(): IRegionData; } } declare module 'CanvasTools/CanvasTools/Core/Tag' { import { Color } from "CanvasTools/CanvasTools/Core/Colors/Color"; import { ITag } from "CanvasTools/CanvasTools/Interface/ITag"; export class Tag implements ITag { static BuildFromJSON(data: ITag): Tag; static getHueFromColor(color: string): number; get colorHue(): number; get color(): string; get name(): string; get id(): string; get colorPure(): string; get colorAccent(): string; get colorHighlight(): string; get colorShadow(): string; get colorDark(): string; get colorNoColor(): string; constructor(name: string, colorHue: number, id?: string); constructor(name: string, cssColor: string, id?: string); constructor(name: string, color: Color, id?: string); copy(): Tag; toJSON(): ITag; } } declare module 'CanvasTools/CanvasTools/Core/TagsDescriptor' { import { ITagsDescriptor } from "CanvasTools/CanvasTools/Interface/ITagsDescriptor"; import { Tag } from "CanvasTools/CanvasTools/Core/Tag"; export class TagsDescriptor { static BuildFromJSON(data: ITagsDescriptor): TagsDescriptor; get all(): Tag[]; get primary(): Tag; get secondary(): Tag[]; constructor(); constructor(tags: Tag[]); constructor(primaryTag: Tag, secondaryTags: Tag[]); toString(): string; toJSON(): ITagsDescriptor; } } declare module 'CanvasTools/CanvasTools/Core/Utils/calculateLineSegments' { import { ILineSegment } from "CanvasTools/CanvasTools/Interface/ILineSegment"; import { IPoint2D } from "CanvasTools/CanvasTools/Interface/IPoint2D"; import { RegionDataType } from "CanvasTools/CanvasTools/Interface/RegionDataType"; export function calculateLineSegments(points: IPoint2D[], options?: { regionType: RegionDataType; }): ILineSegment[]; } declare module 'CanvasTools/CanvasTools/Core/Utils/mapIndexRecord' { export function mapIndexRecord(record: Record | Record, mapFn: (c: K, idx: number) => T): Record; } declare module 'CanvasTools/CanvasTools/Core/ZoomManager' { import { IZoomCallbacks } from "CanvasTools/CanvasTools/Interface/IZoomCallbacks"; export interface ZoomData { minZoomScale: number; maxZoomScale: number; previousZoomScale: number; currentZoomScale: number; } export interface ZoomProperties { isZoomEnabled: boolean; zoomType: ZoomType; } export interface CursorPosition { x: number; y: number; } export enum ZoomDirection { In = 0, Out = 1 } export enum ZoomType { Default = 0, ImageCenter = 1, ViewportCenter = 2, CursorCenter = 3 } export class ZoomManager { get resetZoomOnContentLoad(): boolean; set resetZoomOnContentLoad(reset: boolean); static getInstance(isZoomEnabled?: boolean, editorContainerDiv?: HTMLDivElement, zoomCallbacks?: IZoomCallbacks, maxZoom?: number, zoomScale?: number): ZoomManager; isZoomEnabled: boolean; zoomType: ZoomType; callbacks: IZoomCallbacks; isDraggingEnabled: boolean; updateZoomScale(zoomType: ZoomDirection, newScale?: number): ZoomData; setMaxZoomScale(maxZoomScale: number): void; setZoomScale(zoomScale: number): void; getZoomData(): ZoomData; deleteInstance(): void; setDragging(activate: boolean): void; } } declare module 'CanvasTools/CanvasTools/Interface/IAnchorMixin' { export interface IAnchorMixin { buildAnchors(): void; redraw(): void; } } declare module 'CanvasTools/CanvasTools/Interface/IBoundable' { import { IResizable } from "CanvasTools/CanvasTools/Interface/IResizable"; export interface IBoundable { boundToRect(rect: IResizable): T; } } declare module 'CanvasTools/CanvasTools/Interface/ICubicBezierControl' { import { IPoint2D } from "CanvasTools/CanvasTools/Interface/IPoint2D"; export interface ICubicBezierControl { c1: IPoint2D; c2: IPoint2D; } } declare module 'CanvasTools/CanvasTools/Interface/IEventDescriptor' { export interface IEventDescriptor { event: string; listener: (e: T) => void; base: SVGSVGElement | HTMLElement | Window; bypass: boolean; } export interface IMouseEventDescriptor extends IEventDescriptor { } export interface IPointerEventDescriptor extends IEventDescriptor { } export interface IKeyboardEventDescriptor extends IEventDescriptor { } export interface IWheelEventDescriptor extends IEventDescriptor { } export type EventListeners = Array; } declare module 'CanvasTools/CanvasTools/Interface/IFreezable' { export interface IFreezable { freeze(): void; unfreeze(): void; } } declare module 'CanvasTools/CanvasTools/Interface/IHideadble' { export interface IHideable { hide(): void; show(): void; } } declare module 'CanvasTools/CanvasTools/Interface/ILineSegment' { import { IPoint2D } from "CanvasTools/CanvasTools/Interface/IPoint2D"; export interface ILineSegment { start: IPoint2D; end: IPoint2D; xLength: number; yLength: number; pointsAlongLine: { oneThird: IPoint2D; half: IPoint2D; twoThird: IPoint2D; }; } } declare module 'CanvasTools/CanvasTools/Interface/IMovable' { import { IPoint2D } from "CanvasTools/CanvasTools/Interface/IPoint2D"; export interface IMovable extends IPoint2D { move(point: IPoint2D): void; move(x: number, y: number): void; } } declare module 'CanvasTools/CanvasTools/Interface/IPoint2D' { export interface IPoint2D { x: number; y: number; } } declare module 'CanvasTools/CanvasTools/Interface/IRect' { export interface IRect { width: number; height: number; } } declare module 'CanvasTools/CanvasTools/Interface/IRegionCallbacks' { import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { RegionComponent } from "CanvasTools/CanvasTools/Region/Component/RegionComponent"; export type RegionManipulationFunction = (UIElement?: RegionComponent) => void; export type RegionManipulationLockFunction = (UIElement?: RegionComponent) => void; export enum ChangeEventType { MOVEEND = 0, MOVING = 1, MOVEBEGIN = 2, SELECTIONTOGGLE = 3 } export type RegionChangeFunction = (region: RegionComponent, regionData: RegionData, eventType?: ChangeEventType, multiSelection?: boolean) => void; export interface IRegionCallbacks { onManipulationBegin: RegionManipulationFunction; onManipulationEnd: RegionManipulationFunction; onChange: RegionChangeFunction; onManipulationLockRequest?: RegionManipulationLockFunction; onManipulationLockRelease?: RegionManipulationLockFunction; } } declare module 'CanvasTools/CanvasTools/Interface/IRegionData' { import { RegionDataType } from "CanvasTools/CanvasTools/Core/RegionData"; import { ICubicBezierControl } from "CanvasTools/CanvasTools/Interface/ICubicBezierControl"; import { IPoint2D } from "CanvasTools/CanvasTools/Interface/IPoint2D"; import { IRect } from "CanvasTools/CanvasTools/Interface/IRect"; export interface IRegionData extends IPoint2D, IRect { x: number; y: number; width: number; height: number; points: IPoint2D[]; bezierControls: Record; type: RegionDataType; } } declare module 'CanvasTools/CanvasTools/Interface/IRegionsManagerCallbacks' { import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { IRegionCallbacks } from "CanvasTools/CanvasTools/Interface/IRegionCallbacks"; export type RegionUpdateFunction = (id: string, regionData?: RegionData) => void; export type RegionSelectionFunction = (id: string, multiselection?: boolean) => void; export interface IRegionsManagerCallbacks extends IRegionCallbacks { onRegionSelected?: RegionSelectionFunction; onRegionMove?: RegionUpdateFunction; onRegionMoveBegin?: RegionUpdateFunction; onRegionMoveEnd?: RegionUpdateFunction; onRegionDelete?: RegionUpdateFunction; } } declare module 'CanvasTools/CanvasTools/Interface/IResizable' { import { IRect } from "CanvasTools/CanvasTools/Interface/IRect"; export interface IResizable extends IRect { resize(width: number, height: number): void; } } declare module 'CanvasTools/CanvasTools/Interface/ISelectorCallbacks' { import { Point2D } from "CanvasTools/CanvasTools/Core/Point2D"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; export type SelectionNotifyFunction = () => void; export type PointSelectionNotifyFunction = (point: Point2D) => void; export type SelectionConfirmFunction = (regionData: RegionData) => void; export interface ISelectorCallbacks { onSelectionBegin: SelectionNotifyFunction; onSelectionEnd: SelectionConfirmFunction; onNextSelectionPoint?: PointSelectionNotifyFunction; onLocked?: () => void; onUnlocked?: () => void; } } declare module 'CanvasTools/CanvasTools/Interface/ISelectorSettings' { import { IRect } from "CanvasTools/CanvasTools/Interface/IRect"; export enum SelectionMode { NONE = 0, POINT = 1, RECT = 2, COPYRECT = 3, POLYLINE = 4, POLYGON = 5 } export interface ISelectorSettings { mode: SelectionMode; template?: IRect; } } declare module 'CanvasTools/CanvasTools/Interface/ITag' { export interface ITag { colorHue?: number; color: string; name: string; id?: string; } } declare module 'CanvasTools/CanvasTools/Interface/ITagsDescriptor' { import { ITag } from "CanvasTools/CanvasTools/Interface/ITag"; export interface ITagsDescriptor { primary: ITag; secondary?: ITag[]; } } declare module 'CanvasTools/CanvasTools/Interface/ITagsUpdateOptions' { export interface ITagsUpdateOptions { showRegionBackground: boolean; showTagsText: boolean; } } declare module 'CanvasTools/CanvasTools/Interface/IToolbarIcon' { export interface IToolbarIcon { action: string; iconUrl: string; tooltip: string; width: number; height: number; key: string[]; } } declare module 'CanvasTools/CanvasTools/Interface/IZoomCallbacks' { import { CursorPosition, ZoomData } from "CanvasTools/CanvasTools/Core/ZoomManager"; export type ZoomFunction = (cursorPos?: CursorPosition) => void; export type ZoomUpdateFunction = (zoomData: ZoomData) => void; export interface IZoomCallbacks { onZoomingOut: ZoomFunction; onZoomingIn: ZoomFunction; getZoomLevel: () => number; setZoomLevel: (zoomScale: number) => ZoomData; onDragActivated: () => void; onDragDeactivated: () => void; } } declare module 'CanvasTools/CanvasTools/Interface/RegionDataType' { export enum RegionDataType { Point = "point", Rect = "rect", Polyline = "polyline", Polygon = "polygon", Path = "Path" } } declare module 'CanvasTools/CanvasTools/Region/Component/AnchorsComponent' { import { Point2D } from "CanvasTools/CanvasTools/Core/Point2D"; import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { IAnchorMixin } from "CanvasTools/CanvasTools/Interface/IAnchorMixin"; import { IRegionCallbacks } from "CanvasTools/CanvasTools/Interface/IRegionCallbacks"; import { RegionComponent } from "CanvasTools/CanvasTools/Region/Component/RegionComponent"; export abstract class AnchorsComponent extends RegionComponent { static DEFAULT_ANCHOR_RADIUS: number; static DEFAULT_GHOST_ANCHOR_RADIUS: number; protected mixins: IAnchorMixin[]; protected anchors: Snap.Element[]; protected anchorsNode: Snap.Element; protected ghostAnchor: Snap.Element; protected activeAnchorIndex: number; protected dragOrigin: Point2D; protected isDragged: boolean; constructor(paper: Snap.Paper, paperRect: Rect, regionData: RegionData, callbacks: IRegionCallbacks); redraw(): void; freeze(): void; protected buildAnchors(): void; protected buildPointAnchors(): void; protected buildGhostAnchor(): void; protected subscribeAnchorToEvents(anchor: Snap.Element, index: number): void; protected createAnchor(paper: Snap.Paper, x: number, y: number, style?: string, r?: number): Snap.Element; protected abstract updateRegion(p: Point2D): any; protected onGhostPointerEnter(e: PointerEvent): void; protected onGhostPointerLeave(e: PointerEvent): void; protected onGhostPointerDown(e: PointerEvent): void; protected onGhostPointerMove(e: PointerEvent): void; protected onGhostPointerUp(e: PointerEvent): void; protected subscribeGhostToEvents(): void; protected getActiveAnchorPoint(e?: PointerEvent): Point2D; } } declare module 'CanvasTools/CanvasTools/Region/Component/BezierController' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { IAnchorMixin } from "CanvasTools/CanvasTools/Interface/IAnchorMixin"; import { EventListeners } from "CanvasTools/CanvasTools/Interface/IEventDescriptor"; import { IRegionCallbacks } from "CanvasTools/CanvasTools/Interface/IRegionCallbacks"; import { AnchorsComponent } from "CanvasTools/CanvasTools/Region/Component/AnchorsComponent"; export class BezierController implements IAnchorMixin { constructor(anchorComponent: AnchorsComponent, paper: Snap.Paper, paperRect: Rect, regionData: RegionData, anchorsNode: Snap.Element, callbacks: IRegionCallbacks, createAnchor: (paper: Snap.Paper, x: number, y: number, style?: string, r?: number) => Snap.Element, subscribeToEvents: (listeners: EventListeners) => void); buildAnchors(): void; redraw(): void; } } declare module 'CanvasTools/CanvasTools/Region/Component/DragComponent' { import { Point2D } from "CanvasTools/CanvasTools/Core/Point2D"; import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { IRegionCallbacks } from "CanvasTools/CanvasTools/Interface/IRegionCallbacks"; import { RegionComponent } from "CanvasTools/CanvasTools/Region/Component/RegionComponent"; export abstract class DragComponent extends RegionComponent { protected dragNode: Snap.Element; protected isDragged: boolean; protected dragOrigin: Point2D; constructor(paper: Snap.Paper, paperRect: Rect, regionData: RegionData, callbacks: IRegionCallbacks); freeze(): void; protected subscribeToDragEvents(): void; } } declare module 'CanvasTools/CanvasTools/Region/Component/MidpointComponent' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { ILineSegment } from "CanvasTools/CanvasTools/Interface/ILineSegment"; import { IRegionCallbacks } from "CanvasTools/CanvasTools/Interface/IRegionCallbacks"; import { RegionComponent } from "CanvasTools/CanvasTools/Region/Component/RegionComponent"; export abstract class MidpointComponent extends RegionComponent { static DEFAULT_RADIUS: number; protected midpointElements: Record; protected midpointNode: Snap.Element; constructor(paper: Snap.Paper, paperRect: Rect, regionData: RegionData, callbacks: IRegionCallbacks); redraw(): void; protected abstract subscribeMidpointToEvents(midpoint: Snap.Element, index: number): void; protected createMidpoint(paper: Snap.Paper, x: number, y: number, style?: string, r?: number): Snap.Element; protected teardownMidpoints(): void; protected buildMidpoints(regionLineSegments: ILineSegment[]): void; } } declare module 'CanvasTools/CanvasTools/Region/Component/RegionComponent' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { EventListeners } from "CanvasTools/CanvasTools/Interface/IEventDescriptor"; import { IFreezable } from "CanvasTools/CanvasTools/Interface/IFreezable"; import { IHideable } from "CanvasTools/CanvasTools/Interface/IHideadble"; import { IMovable } from "CanvasTools/CanvasTools/Interface/IMovable"; import { IPoint2D } from "CanvasTools/CanvasTools/Interface/IPoint2D"; import { IRegionCallbacks } from "CanvasTools/CanvasTools/Interface/IRegionCallbacks"; import { IResizable } from "CanvasTools/CanvasTools/Interface/IResizable"; export abstract class RegionComponent implements IHideable, IResizable, IMovable, IFreezable { node: Snap.Element; regionData: RegionData; isVisible: boolean; isFrozen: boolean; isSelected: boolean; protected paper: Snap.Paper; protected paperRect: Rect; get x(): number; get y(): number; get width(): number; get height(): number; get area(): number; get boundRect(): Rect; protected callbacks: IRegionCallbacks; constructor(paper: Snap.Paper, paperRect: Rect, regionData: RegionData, callbacks?: IRegionCallbacks); hide(): void; show(): void; select(): void; unselect(): void; freeze(): void; unfreeze(): void; move(point: IPoint2D): void; move(x: number, y: number): void; abstract redraw(): void; resize(width: number, height: number): void; resizePaper(width: number, height: number): void; protected subscribeToEvents(listeners: EventListeners): void; protected makeFreezable(f: (args: PointerEvent | KeyboardEvent) => void, bypass?: boolean): (args: PointerEvent | KeyboardEvent) => void; } } declare module 'CanvasTools/CanvasTools/Region/Component/TagsComponent' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { TagsDescriptor } from "CanvasTools/CanvasTools/Core/TagsDescriptor"; import { ITagsUpdateOptions } from "CanvasTools/CanvasTools/Interface/ITagsUpdateOptions"; import { RegionComponent } from "CanvasTools/CanvasTools/Region/Component/RegionComponent"; export abstract class TagsComponent extends RegionComponent { static getCachedBBox(primaryTagNode: Snap.Element): Snap.BBox; tags: TagsDescriptor; protected primaryTagNode: Snap.Element; protected secondaryTagsNode: Snap.Element; protected secondaryTags: Snap.Element[]; protected styleId: string; protected styleSheet: CSSStyleSheet; protected tagsUpdateOptions: ITagsUpdateOptions; protected styleMap: Array<{ rule: string; style: string; }>; protected styleLightMap: Array<{ rule: string; style: string; }>; constructor(paper: Snap.Paper, paperRect: Rect, regionData: RegionData, tags: TagsDescriptor, styleId: string, styleSheet: CSSStyleSheet, tagsUpdateOptions?: ITagsUpdateOptions); updateTags(tags: TagsDescriptor, options?: ITagsUpdateOptions): void; protected abstract initStyleMaps(tags: TagsDescriptor): any; protected abstract rebuildTagLabels(): any; protected clearStyleMaps(): void; protected applyStyleMaps(showRegionBackground?: boolean): void; protected applyStyleForTagsVisibility(showTagsText?: boolean): void; } } declare module 'CanvasTools/CanvasTools/Region/Path/AnchorsElement' { import { Point2D } from "CanvasTools/CanvasTools/Core/Point2D"; import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { IRegionCallbacks } from "CanvasTools/CanvasTools/Interface/IRegionCallbacks"; import { AnchorsComponent } from "CanvasTools/CanvasTools/Region/Component/AnchorsComponent"; export class AnchorsElement extends AnchorsComponent { static ANCHOR_POINT_LINE_SWITCH_THRESHOLD: number; static MIN_NUMBERS_OF_POINTS_PER_POLYGON: number; constructor(paper: Snap.Paper, paperRect: Rect, regionData: RegionData, callbacks: IRegionCallbacks); redraw(): void; protected buildAnchors(): void; protected buildAnchorLines(): void; protected updateAnchorLines(): void; protected subscribeLineToEvents(anchor: Snap.Element, index: number): void; protected updateRegion(p: Point2D): void; protected onGhostPointerEnter(e: PointerEvent): void; protected onGhostPointerMove(e: PointerEvent): void; protected onGhostPointerUp(e: PointerEvent): void; protected getActiveAnchorPoint(e: PointerEvent): Point2D; } } declare module 'CanvasTools/CanvasTools/Region/Path/MidpointElement' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { IRegionCallbacks } from "CanvasTools/CanvasTools/Interface/IRegionCallbacks"; import { MidpointComponent } from "CanvasTools/CanvasTools/Region/Component/MidpointComponent"; export class MidpointElement extends MidpointComponent { constructor(paper: Snap.Paper, paperRect: Rect, regionData: RegionData, callbacks: IRegionCallbacks); protected subscribeMidpointToEvents(midpoint: Snap.Element, index: number): void; } } declare module 'CanvasTools/CanvasTools/Region/Path/PathRegion' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { TagsDescriptor } from "CanvasTools/CanvasTools/Core/TagsDescriptor"; import { IRegionCallbacks } from "CanvasTools/CanvasTools/Interface/IRegionCallbacks"; import { ITagsUpdateOptions } from "CanvasTools/CanvasTools/Interface/ITagsUpdateOptions"; import { Region } from "CanvasTools/CanvasTools/Region/Region"; export class PathRegion extends Region { constructor(paper: Snap.Paper, paperRect: Rect, regionData: RegionData, callbacks: IRegionCallbacks, id: string, tagsDescriptor: TagsDescriptor, tagsUpdateOptions?: ITagsUpdateOptions); updateTags(tags: TagsDescriptor, options?: ITagsUpdateOptions): void; resize(width: number, height: number): void; } } declare module 'CanvasTools/CanvasTools/Region/Path/TagsElement' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { TagsDescriptor } from "CanvasTools/CanvasTools/Core/TagsDescriptor"; import { ITagsUpdateOptions } from "CanvasTools/CanvasTools/Interface/ITagsUpdateOptions"; import { TagsComponent } from "CanvasTools/CanvasTools/Region/Component/TagsComponent"; export class TagsElement extends TagsComponent { static DEFAULT_PRIMARY_TAG_RADIUS: number; static DEFAULT_SECONDARY_TAG_SIZE: number; static DEFAULT_SECONDARY_TAG_DY: number; constructor(paper: Snap.Paper, paperRect: Rect, regionData: RegionData, tags: TagsDescriptor, styleId: string, styleSheet: CSSStyleSheet, tagsUpdateOptions?: ITagsUpdateOptions); redraw(rebuildTags?: boolean): void; protected initStyleMaps(tags: TagsDescriptor): void; protected rebuildTagLabels(): void; } } declare module 'CanvasTools/CanvasTools/Region/Point/DragElement' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { IRegionCallbacks } from "CanvasTools/CanvasTools/Interface/IRegionCallbacks"; import { DragComponent } from "CanvasTools/CanvasTools/Region/Component/DragComponent"; export class DragElement extends DragComponent { static DEFAULT_DRAG_RADIUS: number; constructor(paper: Snap.Paper, paperRect: Rect, regionData: RegionData, callbacks: IRegionCallbacks); redraw(): void; } } declare module 'CanvasTools/CanvasTools/Region/Point/PointRegion' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { TagsDescriptor } from "CanvasTools/CanvasTools/Core/TagsDescriptor"; import { IRegionCallbacks } from "CanvasTools/CanvasTools/Interface/IRegionCallbacks"; import { ITagsUpdateOptions } from "CanvasTools/CanvasTools/Interface/ITagsUpdateOptions"; import { Region } from "CanvasTools/CanvasTools/Region/Region"; export class PointRegion extends Region { constructor(paper: Snap.Paper, paperRect: Rect, regionData: RegionData, callbacks: IRegionCallbacks, id: string, tagsDescriptor: TagsDescriptor, tagsUpdateOptions?: ITagsUpdateOptions); updateTags(tags: TagsDescriptor, options?: ITagsUpdateOptions): void; } } declare module 'CanvasTools/CanvasTools/Region/Point/TagsElement' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { TagsDescriptor } from "CanvasTools/CanvasTools/Core/TagsDescriptor"; import { ITagsUpdateOptions } from "CanvasTools/CanvasTools/Interface/ITagsUpdateOptions"; import { TagsComponent } from "CanvasTools/CanvasTools/Region/Component/TagsComponent"; export class TagsElement extends TagsComponent { static DEFAULT_PRIMARY_TAG_RADIUS: number; static DEFAULT_SECONDARY_TAG_SIZE: number; static DEFAULT_SECONDARY_TAG_DY: number; constructor(paper: Snap.Paper, paperRect: Rect, regionData: RegionData, tags: TagsDescriptor, styleId: string, styleSheet: CSSStyleSheet, tagsUpdateOptions?: ITagsUpdateOptions); redraw(): void; protected initStyleMaps(tags: TagsDescriptor): void; protected rebuildTagLabels(): void; } } declare module 'CanvasTools/CanvasTools/Region/Polygon/AnchorsElement' { import { Point2D } from "CanvasTools/CanvasTools/Core/Point2D"; import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { IRegionCallbacks } from "CanvasTools/CanvasTools/Interface/IRegionCallbacks"; import { AnchorsComponent } from "CanvasTools/CanvasTools/Region/Component/AnchorsComponent"; export class AnchorsElement extends AnchorsComponent { static ANCHOR_POINT_LINE_SWITCH_THRESHOLD: number; static MIN_NUMBERS_OF_POINTS_PER_POLYGON: number; constructor(paper: Snap.Paper, paperRect: Rect, regionData: RegionData, callbacks: IRegionCallbacks); redraw(): void; protected buildAnchors(): void; protected buildPolylineAnchors(): void; protected subscribeLineToEvents(anchor: Snap.Element): void; protected updateRegion(p: Point2D): void; protected onGhostPointerEnter(e: PointerEvent): void; protected onGhostPointerMove(e: PointerEvent): void; protected onGhostPointerUp(e: PointerEvent): void; protected getActiveAnchorPoint(e: PointerEvent): Point2D; } } declare module 'CanvasTools/CanvasTools/Region/Polygon/DragElement' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { IRegionCallbacks } from "CanvasTools/CanvasTools/Interface/IRegionCallbacks"; import { DragComponent } from "CanvasTools/CanvasTools/Region/Component/DragComponent"; export class DragElement extends DragComponent { constructor(paper: Snap.Paper, paperRect: Rect, regionData: RegionData, callbacks: IRegionCallbacks); redraw(): void; } } declare module 'CanvasTools/CanvasTools/Region/Polygon/PolygonRegion' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { TagsDescriptor } from "CanvasTools/CanvasTools/Core/TagsDescriptor"; import { IRegionCallbacks } from "CanvasTools/CanvasTools/Interface/IRegionCallbacks"; import { ITagsUpdateOptions } from "CanvasTools/CanvasTools/Interface/ITagsUpdateOptions"; import { Region } from "CanvasTools/CanvasTools/Region/Region"; export class PolygonRegion extends Region { constructor(paper: Snap.Paper, paperRect: Rect, regionData: RegionData, callbacks: IRegionCallbacks, id: string, tagsDescriptor: TagsDescriptor, tagsUpdateOptions?: ITagsUpdateOptions); updateTags(tags: TagsDescriptor, options?: ITagsUpdateOptions): void; resize(width: number, height: number): void; } } declare module 'CanvasTools/CanvasTools/Region/Polygon/TagsElement' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { TagsDescriptor } from "CanvasTools/CanvasTools/Core/TagsDescriptor"; import { ITagsUpdateOptions } from "CanvasTools/CanvasTools/Interface/ITagsUpdateOptions"; import { TagsComponent } from "CanvasTools/CanvasTools/Region/Component/TagsComponent"; export class TagsElement extends TagsComponent { static DEFAULT_PRIMARY_TAG_RADIUS: number; static DEFAULT_SECONDARY_TAG_SIZE: number; static DEFAULT_SECONDARY_TAG_DY: number; constructor(paper: Snap.Paper, paperRect: Rect, regionData: RegionData, tags: TagsDescriptor, styleId: string, styleSheet: CSSStyleSheet, tagsUpdateOptions?: ITagsUpdateOptions); redraw(rebuildTags?: boolean): void; protected initStyleMaps(tags: TagsDescriptor): void; protected rebuildTagLabels(): void; } } declare module 'CanvasTools/CanvasTools/Region/Polyline/AnchorsElement' { import { Point2D } from "CanvasTools/CanvasTools/Core/Point2D"; import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { IRegionCallbacks } from "CanvasTools/CanvasTools/Interface/IRegionCallbacks"; import { AnchorsComponent } from "CanvasTools/CanvasTools/Region/Component/AnchorsComponent"; export class AnchorsElement extends AnchorsComponent { static ANCHOR_POINT_LINE_SWITCH_THRESHOLD: number; constructor(paper: Snap.Paper, paperRect: Rect, regionData: RegionData, callbacks: IRegionCallbacks); redraw(): void; protected buildAnchors(): void; protected buildPolylineAnchors(): void; protected subscribeLineToEvents(anchor: Snap.Element): void; protected updateRegion(p: Point2D): void; protected onGhostPointerEnter(e: PointerEvent): void; protected onGhostPointerMove(e: PointerEvent): void; protected onGhostPointerUp(e: PointerEvent): void; protected getActiveAnchorPoint(e: PointerEvent): Point2D; } } declare module 'CanvasTools/CanvasTools/Region/Polyline/DragElement' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { IRegionCallbacks } from "CanvasTools/CanvasTools/Interface/IRegionCallbacks"; import { DragComponent } from "CanvasTools/CanvasTools/Region/Component/DragComponent"; export class DragElement extends DragComponent { constructor(paper: Snap.Paper, paperRect: Rect, regionData: RegionData, callbacks: IRegionCallbacks); redraw(): void; } } declare module 'CanvasTools/CanvasTools/Region/Polyline/PolylineRegion' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { TagsDescriptor } from "CanvasTools/CanvasTools/Core/TagsDescriptor"; import { IRegionCallbacks } from "CanvasTools/CanvasTools/Interface/IRegionCallbacks"; import { ITagsUpdateOptions } from "CanvasTools/CanvasTools/Interface/ITagsUpdateOptions"; import { Region } from "CanvasTools/CanvasTools/Region/Region"; export class PolylineRegion extends Region { constructor(paper: Snap.Paper, paperRect: Rect, regionData: RegionData, callbacks: IRegionCallbacks, id: string, tagsDescriptor: TagsDescriptor, tagsUpdateOptions?: ITagsUpdateOptions); updateTags(tags: TagsDescriptor, options?: ITagsUpdateOptions): void; resize(width: number, height: number): void; } } declare module 'CanvasTools/CanvasTools/Region/Polyline/TagsElement' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { TagsDescriptor } from "CanvasTools/CanvasTools/Core/TagsDescriptor"; import { ITagsUpdateOptions } from "CanvasTools/CanvasTools/Interface/ITagsUpdateOptions"; import { TagsComponent } from "CanvasTools/CanvasTools/Region/Component/TagsComponent"; export class TagsElement extends TagsComponent { static DEFAULT_PRIMARY_TAG_RADIUS: number; static DEFAULT_SECONDARY_TAG_SIZE: number; static DEFAULT_SECONDARY_TAG_DY: number; constructor(paper: Snap.Paper, paperRect: Rect, regionData: RegionData, tags: TagsDescriptor, styleId: string, styleSheet: CSSStyleSheet, tagsUpdateOptions?: ITagsUpdateOptions); redraw(): void; protected initStyleMaps(tags: TagsDescriptor): void; protected rebuildTagLabels(): void; } } declare module 'CanvasTools/CanvasTools/Region/Rect/AnchorsElements' { import { Point2D } from "CanvasTools/CanvasTools/Core/Point2D"; import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { IRegionCallbacks } from "CanvasTools/CanvasTools/Interface/IRegionCallbacks"; import { AnchorsComponent } from "CanvasTools/CanvasTools/Region/Component/AnchorsComponent"; export class AnchorsElement extends AnchorsComponent { constructor(paper: Snap.Paper, paperRect: Rect, regionData: RegionData, callbacks: IRegionCallbacks); redraw(): void; protected buildAnchors(): void; protected buildPointAnchors(): void; protected buildBoneAnchors(): void; protected createAnchorBone(paper: Snap.Paper, x: number, y: number, width: number, height: number, style?: string, thickness?: number): Snap.Element; protected updateRegion(p: Point2D): void; protected onGhostPointerEnter(e: PointerEvent): void; protected onGhostPointerLeave(e: PointerEvent): void; protected subscribeAnchorBoneToEvents(bone: Snap.Element, index: number): void; protected getActiveAnchorPoint(e?: PointerEvent): Point2D; } } declare module 'CanvasTools/CanvasTools/Region/Rect/DragElement' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { IRegionCallbacks } from "CanvasTools/CanvasTools/Interface/IRegionCallbacks"; import { DragComponent } from "CanvasTools/CanvasTools/Region/Component/DragComponent"; export class DragElement extends DragComponent { constructor(paper: Snap.Paper, paperRect: Rect, regionData: RegionData, callbacks: IRegionCallbacks); redraw(): void; } } declare module 'CanvasTools/CanvasTools/Region/Rect/RectRegion' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { TagsDescriptor } from "CanvasTools/CanvasTools/Core/TagsDescriptor"; import { IRegionCallbacks } from "CanvasTools/CanvasTools/Interface/IRegionCallbacks"; import { ITagsUpdateOptions } from "CanvasTools/CanvasTools/Interface/ITagsUpdateOptions"; import { Region } from "CanvasTools/CanvasTools/Region/Region"; export class RectRegion extends Region { constructor(paper: Snap.Paper, paperRect: Rect, regionData: RegionData, callbacks: IRegionCallbacks, id: string, tagsDescriptor: TagsDescriptor, tagsUpdateOptions?: ITagsUpdateOptions); updateTags(tags: TagsDescriptor, options?: ITagsUpdateOptions): void; resize(width: number, height: number): void; } } declare module 'CanvasTools/CanvasTools/Region/Rect/TagsElement' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { TagsDescriptor } from "CanvasTools/CanvasTools/Core/TagsDescriptor"; import { ITagsUpdateOptions } from "CanvasTools/CanvasTools/Interface/ITagsUpdateOptions"; import { TagsComponent } from "CanvasTools/CanvasTools/Region/Component/TagsComponent"; export class TagsElement extends TagsComponent { constructor(paper: Snap.Paper, paperRect: Rect, regionData: RegionData, tags: TagsDescriptor, styleId: string, styleSheet: CSSStyleSheet, tagsUpdateOptions?: ITagsUpdateOptions); redraw(rebuildTags?: boolean): void; protected initStyleMaps(tags: TagsDescriptor): void; protected rebuildTagLabels(): void; } } declare module 'CanvasTools/CanvasTools/Region/Region' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { TagsDescriptor } from "CanvasTools/CanvasTools/Core/TagsDescriptor"; import { IMovable } from "CanvasTools/CanvasTools/Interface/IMovable"; import { IRegionCallbacks } from "CanvasTools/CanvasTools/Interface/IRegionCallbacks"; import { ITagsUpdateOptions } from "CanvasTools/CanvasTools/Interface/ITagsUpdateOptions"; import { RegionComponent } from "CanvasTools/CanvasTools/Region/Component/RegionComponent"; export abstract class Region extends RegionComponent { tags: TagsDescriptor; ID: string; regionID: string; protected UI: RegionComponent[]; protected styleID: string; protected styleSheet: CSSStyleSheet; protected tagsUpdateOptions: ITagsUpdateOptions; constructor(paper: Snap.Paper, paperRect: Rect, regionData: RegionData, callbacks: IRegionCallbacks, id: string, tagsDescriptor: TagsDescriptor, tagsUpdateOptions?: ITagsUpdateOptions); removeStyles(): void; updateTags(tags: TagsDescriptor, options?: ITagsUpdateOptions): void; move(point: IMovable): void; move(x: number, y: number): void; resize(width: number, height: number): void; redraw(): void; freeze(): void; unfreeze(): void; protected s8(): string; } } declare module 'CanvasTools/CanvasTools/Region/RegionMenu' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { IMovable } from "CanvasTools/CanvasTools/Interface/IMovable"; import { IRegionCallbacks } from "CanvasTools/CanvasTools/Interface/IRegionCallbacks"; import { RegionComponent } from "CanvasTools/CanvasTools/Region/Component/RegionComponent"; import { Region } from "CanvasTools/CanvasTools/Region/Region"; export class MenuElement extends RegionComponent { static PathCollection: { delete: { iconSize: number; path: string; }; }; menuGroup: Snap.Paper; menuRect: Snap.Element; menuItemsGroup: Snap.Element; menuItems: Snap.Element[]; constructor(paper: Snap.Paper, paperRect: Rect, regionData: RegionData, callbacks: IRegionCallbacks); addAction(action: string, icon: string, actor: (component: RegionComponent, action?: string) => void): void; attachTo(region: Region): void; move(point: IMovable): void; move(x: number, y: number): void; resize(width: number, height: number): void; redraw(): void; hide(): void; show(): void; showOnRegion(region: Region): void; } } declare module 'CanvasTools/CanvasTools/Region/RegionsManager' { import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { TagsDescriptor } from "CanvasTools/CanvasTools/Core/TagsDescriptor"; import { IRegionsManagerCallbacks } from "CanvasTools/CanvasTools/Interface/IRegionsManagerCallbacks"; import { Region } from "CanvasTools/CanvasTools/Region/Region"; export class RegionsManager { callbacks: IRegionsManagerCallbacks; get isFrozen(): boolean; get isFocused(): boolean; constructor(svgHost: SVGSVGElement, callbacks: IRegionsManagerCallbacks); addRegion(id: string, regionData: RegionData, tagsDescriptor: TagsDescriptor): void; addRectRegion(id: string, regionData: RegionData, tagsDescriptor: TagsDescriptor): void; addPointRegion(id: string, regionData: RegionData, tagsDescriptor: TagsDescriptor): void; addPolylineRegion(id: string, regionData: RegionData, tagsDescriptor: TagsDescriptor): void; addPolygonRegion(id: string, regionData: RegionData, tagsDescriptor: TagsDescriptor): void; addPathRegion(id: string, regionData: RegionData, tagsDescriptor: TagsDescriptor): void; redrawAllRegions(): void; getSelectedRegionsBounds(): { id: string; x: number; y: number; width: number; height: number; }[]; getAllRegions(): Array<{ id: string; tags: TagsDescriptor; regionData: RegionData; }>; updateRegionVisibility(shouldHideThisRegion: (tagsDescriptor: TagsDescriptor, region: Region) => boolean, shouldShow: boolean): void; getSelectedRegions(): Array<{ id: string; tags: TagsDescriptor; regionData: RegionData; }>; getSelectedRegionsWithZoomScale(): Array<{ id: string; tags: TagsDescriptor; regionData: RegionData; }>; deleteRegionById(id: string): void; deleteAllRegions(): void; updateTagsById(id: string, tagsDescriptor: TagsDescriptor): void; updateTagsForSelectedRegions(tagsDescriptor: TagsDescriptor): void; selectRegionById(id: string): void; resize(width: number, height: number): void; freeze(nuance?: string): void; unfreeze(): void; focus(): void; unfocus(): void; toggleFreezeMode(): void; toggleBackground(): void; toggleTagsTextVisibility(): void; } } declare module 'CanvasTools/CanvasTools/Selection/AreaSelector' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { RegionData } from "CanvasTools/CanvasTools/Core/RegionData"; import { TagsDescriptor } from "CanvasTools/CanvasTools/Core/TagsDescriptor"; import { IRect } from "CanvasTools/CanvasTools/Interface/IRect"; import { ISelectorCallbacks } from "CanvasTools/CanvasTools/Interface/ISelectorCallbacks"; import { ISelectorSettings, SelectionMode } from "CanvasTools/CanvasTools/Interface/ISelectorSettings"; export class AreaSelector { static DefaultTemplateSize: Rect; callbacks: ISelectorCallbacks; constructor(svgHost: SVGSVGElement, callbacks?: ISelectorCallbacks); resize(width: number, height: number): void; enable(): void; disable(): void; show(): void; hide(): void; undo(): void; redo(): void; canRedo(): boolean; canUndo(): boolean; setSelectionMode(selectionMode: SelectionMode): any; setSelectionMode(settings: ISelectorSettings): any; getSelectorSettings(): ISelectorSettings; reset(): void; updateRectCopyTemplateSelector(template: IRect): void; getRectCopyTemplate(regions: Array<{ id: string; tags: TagsDescriptor; regionData: RegionData; }>): IRect; } } declare module 'CanvasTools/CanvasTools/Selection/Component/AlternatingCrossElement' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { IPoint2D } from "CanvasTools/CanvasTools/Interface/IPoint2D"; import { CrossElement } from "CanvasTools/CanvasTools/Selection/Component/CrossElement"; export class AlternatingCrossElement extends CrossElement { constructor(paper: Snap.Paper, boundRect: Rect); move(p: IPoint2D, boundRect: Rect, square?: boolean, ref?: IPoint2D): void; resize(width: number, height: number): void; protected buildUIElements(): void; } } declare module 'CanvasTools/CanvasTools/Selection/Component/CrossElement' { import { Point2D } from "CanvasTools/CanvasTools/Core/Point2D"; import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { IPoint2D } from "CanvasTools/CanvasTools/Interface/IPoint2D"; import { Element } from "CanvasTools/CanvasTools/Selection/Component/Element"; export class CrossElement extends Element implements IPoint2D { protected hl: Snap.Element; protected vl: Snap.Element; protected center: Point2D; get x(): number; get y(): number; constructor(paper: Snap.Paper, boundRect: Rect); boundToRect(rect: Rect): Point2D; move(p: IPoint2D, boundRect: Rect, square?: boolean, ref?: IPoint2D): void; resize(width: number, height: number): void; protected buildUIElements(): void; } } declare module 'CanvasTools/CanvasTools/Selection/Component/Element' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { IHideable } from "CanvasTools/CanvasTools/Interface/IHideadble"; import { IResizable } from "CanvasTools/CanvasTools/Interface/IResizable"; export abstract class Element implements IHideable, IResizable { node: Snap.Element; protected paper: Snap.Paper; protected boundRect: Rect; protected isVisible: boolean; get width(): number; get height(): number; constructor(paper: Snap.Paper, boundRect: Rect); hide(): void; show(): void; resize(width: number, height: number, oldWidth?: number, oldHeight?: number): void; } } declare module 'CanvasTools/CanvasTools/Selection/Component/MaskElement' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { Element } from "CanvasTools/CanvasTools/Selection/Component/Element"; export class MaskElement extends Element { constructor(paper: Snap.Paper, boundRect: Rect, maskOut: { node: Snap.Element; }); resize(width: number, height: number): void; } } declare module 'CanvasTools/CanvasTools/Selection/Component/RectElement' { import { Point2D } from "CanvasTools/CanvasTools/Core/Point2D"; import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { IPoint2D } from "CanvasTools/CanvasTools/Interface/IPoint2D"; import { IRect } from "CanvasTools/CanvasTools/Interface/IRect"; import { Element } from "CanvasTools/CanvasTools/Selection/Component/Element"; export class RectElement extends Element implements IPoint2D { rect: Rect; get x(): number; get y(): number; constructor(paper: Snap.Paper, boundRect: Rect, rect: IRect); move(p: Point2D): void; resize(width: number, height: number): void; } } declare module 'CanvasTools/CanvasTools/Selection/Selectors/PointSelector' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { ISelectorCallbacks } from "CanvasTools/CanvasTools/Interface/ISelectorCallbacks"; import { Selector } from "CanvasTools/CanvasTools/Selection/Selectors/Selector"; export class PointSelector extends Selector { constructor(parent: SVGSVGElement, paper: Snap.Paper, boundRect: Rect, callbacks?: ISelectorCallbacks); reset(): void; resize(width: number, height: number): void; hide(): void; show(): void; } } declare module 'CanvasTools/CanvasTools/Selection/Selectors/PolygonSelector' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { ISelectorCallbacks } from "CanvasTools/CanvasTools/Interface/ISelectorCallbacks"; import { Selector } from "CanvasTools/CanvasTools/Selection/Selectors/Selector"; export class PolygonSelector extends Selector { constructor(parent: SVGSVGElement, paper: Snap.Paper, boundRect: Rect, callbacks?: ISelectorCallbacks); resize(newWidth: number, newHeight: number, oldWidth?: number, oldHeight?: number): void; hide(): void; show(): void; undo(): void; redo(): void; canRedo(): boolean; canUndo(): boolean; disable(): void; reset(): void; } } declare module 'CanvasTools/CanvasTools/Selection/Selectors/PolylineSelector' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { ISelectorCallbacks } from "CanvasTools/CanvasTools/Interface/ISelectorCallbacks"; import { Selector } from "CanvasTools/CanvasTools/Selection/Selectors/Selector"; export class PolylineSelector extends Selector { constructor(parent: SVGSVGElement, paper: Snap.Paper, boundRect: Rect, callbacks?: ISelectorCallbacks); resize(width: number, height: number): void; hide(): void; show(): void; disable(): void; reset(): void; } } declare module 'CanvasTools/CanvasTools/Selection/Selectors/RectCopySelector' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { IRect } from "CanvasTools/CanvasTools/Interface/IRect"; import { ISelectorCallbacks } from "CanvasTools/CanvasTools/Interface/ISelectorCallbacks"; import { Selector } from "CanvasTools/CanvasTools/Selection/Selectors/Selector"; export class RectCopySelector extends Selector { constructor(parent: SVGSVGElement, paper: Snap.Paper, boundRect: Rect, copyRect: Rect, callbacks?: ISelectorCallbacks); setTemplate(copyRect: IRect): void; resize(width: number, height: number): void; reset(): void; hide(): void; show(): void; getUsingKeyboardCursor(): boolean; activateKeyboardCursor(): void; deactivateKeyboardCursor(): void; } } declare module 'CanvasTools/CanvasTools/Selection/Selectors/RectSelector' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { ISelectorCallbacks } from "CanvasTools/CanvasTools/Interface/ISelectorCallbacks"; import { Selector } from "CanvasTools/CanvasTools/Selection/Selectors/Selector"; export enum SelectionModificator { RECT = 0, SQUARE = 1 } export class RectSelector extends Selector { constructor(parent: SVGSVGElement, paper: Snap.Paper, boundRect: Rect, callbacks?: ISelectorCallbacks); resize(width: number, height: number): void; reset(): void; hide(): void; show(): void; getUsingKeyboardCursor(): boolean; activateKeyboardCursor(): void; deactivateKeyboardCursor(): void; } } declare module 'CanvasTools/CanvasTools/Selection/Selectors/Selector' { import { Rect } from "CanvasTools/CanvasTools/Core/Rect"; import { EventListeners } from "CanvasTools/CanvasTools/Interface/IEventDescriptor"; import { IHideable } from "CanvasTools/CanvasTools/Interface/IHideadble"; import { IResizable } from "CanvasTools/CanvasTools/Interface/IResizable"; import { ISelectorCallbacks } from "CanvasTools/CanvasTools/Interface/ISelectorCallbacks"; import { IPoint2D } from "CanvasTools/CanvasTools/Interface/IPoint2D"; import { CrossElement } from "CanvasTools/CanvasTools/Selection/Component/CrossElement"; import { Element } from "CanvasTools/CanvasTools/Selection/Component/Element"; export abstract class Selector extends Element { callbacks: ISelectorCallbacks; protected isEnabled: boolean; protected parentNode: SVGSVGElement; constructor(parent: SVGSVGElement, paper: Snap.Paper, boundRect: Rect, callbacks?: ISelectorCallbacks); abstract reset(): void; enable(): void; disable(): void; protected subscribeToEvents(listeners: EventListeners): void; protected enablify(f: (args: PointerEvent | KeyboardEvent) => void, bypass?: boolean): (args: PointerEvent | KeyboardEvent) => void; protected showAll(elements: Array): void; protected hideAll(elements: Array): void; protected resizeAll(elements: IResizable[]): void; protected moveCross(cross: CrossElement, pointTo: IPoint2D, square?: boolean, ref?: IPoint2D): void; protected movePoint(point: Snap.Element, pointTo: IPoint2D): void; protected moveLine(line: Snap.Element, pointFrom: IPoint2D, pointTo: IPoint2D): void; } } declare module 'CanvasTools/CanvasTools/Toolbar/Toolbar' { import { IToolbarIcon } from "CanvasTools/CanvasTools/Interface/IToolbarIcon"; import { IconCallback } from "CanvasTools/CanvasTools/Toolbar/ToolbarSelect"; export class Toolbar { constructor(svgHost: SVGSVGElement, isVertical?: boolean); addSelector(icon: IToolbarIcon, actor: IconCallback): void; addSwitch(icon: IToolbarIcon, actor: IconCallback): void; addSeparator(): void; addTrigger(icon: IToolbarIcon, actor: IconCallback): void; select(action: string): void; setSwitch(action: string, on: boolean): void; enableHotkeys(): void; disableHotkeys(): void; } } declare module 'CanvasTools/CanvasTools/Toolbar/ToolbarAction' { export enum ToolbarAction { NONE = "none-select", POINT = "point-select", RECT = "rect-select", COPY = "copy-select", POLYLINE = "polyline-select", POLYGON = "polygon-select", ADD_REMOVE_POINTS = "pointer-add-remove-points-on-polygons", DELETE_ALL = "delete-all-select", SELECTION_LOCK = "selection-lock", BACKGROUND_TOGGLE = "background-toggle", ZOOM_IN = "zoom-in", ZOOM_OUT = "zoom-out", ZOOM_DRAG = "zoom-drag" } } declare module 'CanvasTools/CanvasTools/Toolbar/ToolbarIcon' { import { IToolbarIcon } from "CanvasTools/CanvasTools/Interface/IToolbarIcon"; import { ToolbarAction } from 'CanvasTools/CanvasTools/Toolbar/ToolbarAction'; import { IconCallback, ToolbarSelect } from 'CanvasTools/CanvasTools/Toolbar/ToolbarSelect'; export enum ToolbarItemType { SELECTOR = 0, SWITCH = 1, SEPARATOR = 2, TRIGGER = 3 } export abstract class ToolbarIcon extends ToolbarSelect { static IconWidth: number; static IconHeight: number; width: number; height: number; description: IToolbarIcon; node: Snap.Element; protected paper: Snap.Paper; protected x: number; protected y: number; constructor(paper: Snap.Paper, icon?: IToolbarIcon, onAction?: IconCallback, action?: ToolbarAction, key?: string[]); move(x: number, y: number): void; resize(width: number, height: number): void; select(): void; unselect(): void; protected toggleSelection(): void; } } declare module 'CanvasTools/CanvasTools/Toolbar/ToolbarSelect' { import { ToolbarAction } from 'CanvasTools/CanvasTools/Toolbar/ToolbarAction'; export type IconCallback = (action: string) => void; export class ToolbarSelect { onAction: IconCallback; action: ToolbarAction; key: string[]; protected focused: boolean; protected isSelected: boolean; constructor(onAction: IconCallback, action?: ToolbarAction, key?: string[]); select(): void; unselect(): void; activate(): void; isFocused(): boolean; protected onfocusCallback: () => void; protected onfocusoutCallback: () => void; } } declare module 'CanvasTools/CanvasTools/Toolbar/ToolbarSelectIcon' { import { IToolbarIcon } from "CanvasTools/CanvasTools/Interface/IToolbarIcon"; import { ToolbarAction } from "CanvasTools/CanvasTools/Toolbar/ToolbarAction"; import { ToolbarIcon } from "CanvasTools/CanvasTools/Toolbar/ToolbarIcon"; import { IconCallback } from "CanvasTools/CanvasTools/Toolbar/ToolbarSelect"; export class ToolbarSelectIcon extends ToolbarIcon { constructor(paper: Snap.Paper, icon: IToolbarIcon, onAction: IconCallback, action?: ToolbarAction, key?: string[]); activate(): void; move(x: number, y: number): void; resize(width: number, height: number): void; } } declare module 'CanvasTools/CanvasTools/Toolbar/ToolbarSeparator' { import { ToolbarIcon } from "CanvasTools/CanvasTools/Toolbar/ToolbarIcon"; export class ToolbarSeparator extends ToolbarIcon { constructor(paper: Snap.Paper, width: number, isVertical?: boolean); move(x: number, y: number): void; resize(width: number, height: number): void; } } declare module 'CanvasTools/CanvasTools/Toolbar/ToolbarSwitchIcon' { import { IToolbarIcon } from "CanvasTools/CanvasTools/Interface/IToolbarIcon"; import { ToolbarAction } from "CanvasTools/CanvasTools/Toolbar/ToolbarAction"; import { ToolbarIcon } from "CanvasTools/CanvasTools/Toolbar/ToolbarIcon"; import { IconCallback } from "CanvasTools/CanvasTools/Toolbar/ToolbarSelect"; export class ToolbarSwitchIcon extends ToolbarIcon { onAction: IconCallback; constructor(paper: Snap.Paper, icon: IToolbarIcon, onAction: IconCallback, action?: ToolbarAction, key?: string[]); activate(): void; move(x: number, y: number): void; resize(width: number, height: number): void; } } declare module 'CanvasTools/CanvasTools/Toolbar/ToolbarTriggerIcon' { import { IToolbarIcon } from "CanvasTools/CanvasTools/Interface/IToolbarIcon"; import { ToolbarIcon } from "CanvasTools/CanvasTools/Toolbar/ToolbarIcon"; import { ToolbarAction } from "CanvasTools/CanvasTools/Toolbar/ToolbarAction"; import { IconCallback } from "CanvasTools/CanvasTools/Toolbar/ToolbarSelect"; export class ToolbarTriggerIcon extends ToolbarIcon { constructor(paper: Snap.Paper, icon: IToolbarIcon, onAction: IconCallback, action?: ToolbarAction, key?: string[]); activate(): void; move(x: number, y: number): void; resize(width: number, height: number): void; } }