W-CF Documentation - v11.0.0
    Preparing search index...

    Interface ArticleScreenshotOptions

    Article screenshot generation options.

    interface ArticleScreenshotOptions {
        antiAliasingQuality?: number;
        backgroundColor?: Color4;
        cameraAlpha?: number;
        cameraBeta?: number;
        cameraFov?: number;
        height: number;
        hideSubArticles?: boolean;
        margin?: number;
        mimeType?: string;
        onAfterRender?: () => void;
        onBeforeRender?: () => void;
        onDrawBackground?: (pContext: CanvasRenderingContext2D) => Promise<void>;
        onDrawOverlay?: (pContext: CanvasRenderingContext2D) => Promise<void>;
        orthographic?: boolean;
        pixelScaleFactor?: number;
        renderAsync?: boolean;
        ssaoQuality?: SSAOQuality;
        targetCanvas?: HTMLCanvasElement;
        width: number;
    }

    Hierarchy (View Summary)

    Index
    antiAliasingQuality?: number

    defines the antialiasing quality, higher is better. (range: [0, 32], default: 32)

    backgroundColor?: Color4

    can be used to override the viewer backgroundColor, for transparent backgrounds a premultiplied alpha color has to be used e.g. (0, 0, 0, 0)

    cameraAlpha?: number

    alpha camera rotation (y-axis) in degree (default: -15)

    cameraBeta?: number

    beta camera rotation (x-axis) in degree (default: 20)

    cameraFov?: number

    camera field of view in degree (default: 30)

    height: number

    height of the image in pixel

    hideSubArticles?: boolean

    renders only the main article if true (default: false)

    margin?: number

    margin for the zoom (default: 0.05 (5%))

    mimeType?: string

    MIME-Type of the data uri (default: "image/png")

    onAfterRender?: () => void

    callback which will be called after the rendering

    onBeforeRender?: () => void

    callback which will be called before the rendering

    onDrawBackground?: (pContext: CanvasRenderingContext2D) => Promise<void>

    Allows do draw a background for the generated screenshot. Only called if the current background color is transparent.

    onDrawOverlay?: (pContext: CanvasRenderingContext2D) => Promise<void>

    allows do draw an overlay on the generated screenshot

    orthographic?: boolean

    use orthographic camera mode (default: false)

    pixelScaleFactor?: number

    pixel scale factor is used to scale certain elements like 2D text (default: 1.0)

    renderAsync?: boolean

    if true the rendering will be performed asynchronously (default: false)

    ssaoQuality?: SSAOQuality

    can be used to override the viewer ssaoQuality

    targetCanvas?: HTMLCanvasElement

    Optional target canvas. If defined the screenshot will be rendered into this canvas. Viewer.createScreenshot() will return an empty string in this case.

    width: number

    width of the image in pixel