utils.d.ts 1.2 KB

123456789101112131415161718192021222324
  1. import type { CrossOrigin, ERROR_LEVEL_MAPPED_TYPE, ErrorCorrectionLevel, Excavation, ImageSettings } from './types';
  2. export declare const ERROR_LEVEL_MAP: ERROR_LEVEL_MAPPED_TYPE;
  3. export declare const DEFAULT_SIZE = 160;
  4. export declare const DEFAULT_LEVEL: ErrorCorrectionLevel;
  5. export declare const DEFAULT_BACKGROUND_COLOR = "#FFFFFF";
  6. export declare const DEFAULT_FRONT_COLOR = "#000000";
  7. export declare const DEFAULT_NEED_MARGIN = false;
  8. export declare const DEFAULT_MINVERSION = 1;
  9. export declare const SPEC_MARGIN_SIZE = 4;
  10. export declare const DEFAULT_MARGIN_SIZE = 0;
  11. export declare const DEFAULT_IMG_SCALE = 0.1;
  12. export declare const generatePath: (modules: boolean[][], margin?: number) => string;
  13. export declare const excavateModules: (modules: boolean[][], excavation: Excavation) => boolean[][];
  14. export declare const getImageSettings: (cells: boolean[][], size: number, margin: number, imageSettings?: ImageSettings) => {
  15. x: number;
  16. y: number;
  17. h: number;
  18. w: number;
  19. excavation: Excavation | null;
  20. opacity: number;
  21. crossOrigin: CrossOrigin;
  22. };
  23. export declare const getMarginSize: (needMargin: boolean, marginSize?: number) => number;
  24. export declare const isSupportPath2d: boolean;