mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-26 14:58:55 +08:00
28 lines
589 B
TypeScript
28 lines
589 B
TypeScript
import type { Options, RoughCanvas } from '@blocksuite/affine-block-surface';
|
|
import type { ShapeStyle } from '@blocksuite/affine-model';
|
|
import type { XYWH } from '@blocksuite/global/gfx';
|
|
|
|
export abstract class Shape {
|
|
options: Options;
|
|
|
|
shapeStyle: ShapeStyle;
|
|
|
|
type: string;
|
|
|
|
xywh: XYWH;
|
|
|
|
constructor(
|
|
xywh: XYWH,
|
|
type: string,
|
|
options: Options,
|
|
shapeStyle: ShapeStyle
|
|
) {
|
|
this.xywh = xywh;
|
|
this.type = type;
|
|
this.options = options;
|
|
this.shapeStyle = shapeStyle;
|
|
}
|
|
|
|
abstract draw(ctx: CanvasRenderingContext2D, rc: RoughCanvas): void;
|
|
}
|