import type { DrawerType } from '../drawer'; import type { IPoint } from '../geometry'; import type { ShapeType } from './shape-type'; import type { IObject } from './i-object'; import type { INature } from './i-nature'; import type { IComment } from './i-comment'; import type { IRelation } from './i-relation'; export type CornerType = 'tl' | 'tc' | 'tr' | 'ml' | 'mr' | 'bl' | 'bc' | 'br'; export interface Ishapable { drawerType: DrawerType; shapeType: ShapeType; getId(): string; setId(id: string): void; isObject(): this is IObject; isNature(): this is INature; isComment(): this is IComment; isRelation(): this is IRelation; isSmall(): boolean; getStartEndPoint(): [IPoint, IPoint]; getShapeSize(): number; getCorner(x: number, y: number, absolute?: boolean): CornerType | undefined; getStrokeWidth(): number; setThemeColor(color: string, alpha?: number): void; getThemeColor(): string; changeAlpha(alpha?: number): void; isValid(): boolean; isIntersectWithPoint(x: number, y: number, absolute?: boolean): boolean; isEqual(shape: unknown): boolean; }