Skip to content
1 min read · 15 words

Type Alias: ImageAnnotation

ts
type ImageAnnotation =
  | {
      color?: string;
      fill?: string;
      height: number;
      strokeWidth?: number;
      type: "rect";
      width: number;
      x: number;
      y: number;
    }
  | {
      color?: string;
      strokeWidth?: number;
      type: "line" | "arrow";
      x1: number;
      x2: number;
      y1: number;
      y2: number;
    }
  | {
      color?: string;
      cx: number;
      cy: number;
      fill?: string;
      rx: number;
      ry: number;
      strokeWidth?: number;
      type: "ellipse";
    }
  | {
      color?: string;
      font?: string;
      size?: number;
      text: string;
      type: "text";
      x: number;
      y: number;
    };

Defined in: src/batteries/media/contracts.ts:337

A primitive rendered by the image annotation operation.