Blame view

node_modules/zrender/lib/core/platform.d.ts 637 Bytes
bd028579   易尊强   2/28
1
2
3
4
5
6
7
8
9
10
11
12
13
14
  export declare const DEFAULT_FONT_SIZE = 12;
  export declare const DEFAULT_FONT_FAMILY = "sans-serif";
  export declare const DEFAULT_FONT: string;
  interface Platform {
      createCanvas(): HTMLCanvasElement;
      measureText(text: string, font?: string): {
          width: number;
      };
      loadImage(src: string, onload: () => void | HTMLImageElement['onload'], onerror: () => void | HTMLImageElement['onerror']): HTMLImageElement;
  }
  export declare const DEFAULT_TEXT_WIDTH_MAP: Record<string, number>;
  export declare const platformApi: Platform;
  export declare function setPlatformAPI(newPlatformApis: Partial<Platform>): void;
  export {};