The config that's used by PB.

interface Config {
    autoAdjustOffset: boolean;
    autoDetectRetina: boolean;
    backgroundColor: string;
    canvas: string | HTMLCanvasElement | SVGElement;
    canvasHeightFactor: number;
    canvasWidthFactor: number;
    cssScaleX: number;
    cssScaleY: number;
    cssUniformScale: boolean;
    defaultCanvasHeight: number;
    defaultCanvasWidth: number;
    drawOrigin: boolean;
    drawRaster: boolean;
    enableGL?: boolean;
    enableKeys: boolean;
    enableMouse: boolean;
    enableMouseWheel: boolean;
    enablePan: boolean;
    enableSVGExport: boolean;
    enableTouch: boolean;
    enableZoom: boolean;
    fitToParent: boolean;
    fullSize: boolean;
    isBackdropFiltersEnabled?: boolean;
    offsetAdjustXPercent: number;
    offsetAdjustYPercent: number;
    offsetX: number;
    offsetY: number;
    postDraw?: ((draw, fill) => void);
    preClear?: (() => void);
    preDraw?: ((draw, fill) => void);
    rasterAdjustFactor: number;
    rasterGrid: boolean;
    rasterScaleX: number;
    rasterScaleY: number;
    redrawOnResize: boolean;
    saveFile?: (() => void);
    scaleX: number;
    scaleY: number;
    setToRetina?: (() => void);
}

Hierarchy (view full)

  • Record<string, boolean | number | string | Function | HTMLCanvasElement | SVGElement | undefined>
  • Pick<CSSBackdropFilterParams, "isBackdropFiltersEnabled">

Properties

autoAdjustOffset: boolean
autoDetectRetina: boolean
backgroundColor: string
canvas: string | HTMLCanvasElement | SVGElement
canvasHeightFactor: number
canvasWidthFactor: number
cssScaleX: number
cssScaleY: number
cssUniformScale: boolean
defaultCanvasHeight: number
defaultCanvasWidth: number
drawOrigin: boolean
drawRaster: boolean
enableGL?: boolean
enableKeys: boolean
enableMouse: boolean
enableMouseWheel: boolean
enablePan: boolean
enableSVGExport: boolean
enableTouch: boolean
enableZoom: boolean
fitToParent: boolean
fullSize: boolean
isBackdropFiltersEnabled?: boolean
offsetAdjustXPercent: number
offsetAdjustYPercent: number
offsetX: number
offsetY: number
postDraw?: ((draw, fill) => void)

Type declaration

    • (draw, fill): void
    • Parameters

      Returns void

preClear?: (() => void)

Type declaration

    • (): void
    • Returns void

preDraw?: ((draw, fill) => void)

Type declaration

    • (draw, fill): void
    • Parameters

      Returns void

rasterAdjustFactor: number
rasterGrid: boolean
rasterScaleX: number
rasterScaleY: number
redrawOnResize: boolean
saveFile?: (() => void)

Type declaration

    • (): void
    • Returns void

scaleX: number
scaleY: number
setToRetina?: (() => void)

Type declaration

    • (): void
    • Returns void