DsPdfJS API - v9.1.0
    Preparing search index...

    Type Alias DrawImageOptions

    Provides options for drawing the image.

    type DrawImageOptions = {
        alignX?: ImageAlignHorz;
        alignY?: ImageAlignVert;
        clipBounds?: Bounds | null;
        interpolationMode?: InterpolationMode;
        keepAspectRatio?: boolean;
        opacity?: number;
        scaleToFill?: boolean;
    }
    Index

    Properties

    The horizontal alignment of the image. The default is "Left".

    The vertical alignment of the image. The default is "Top".

    clipBounds?: Bounds | null

    The clipping rectangle on the target surface.

    interpolationMode?: InterpolationMode

    The sampling mode to use when drawing images with resizing. This property does not affect drawing to PdfContext.

    keepAspectRatio?: boolean

    Indicates whether to keep the aspect ration of the image when resizing. The default if false.

    opacity?: number

    The image opacity. The default is 1.

    scaleToFill?: boolean

    If true, the image is scaled down as much as possible but covers the entire destination rectangle. If false, the image is scaled up as much as possible, but does not extend beyond the bounds of the destination rectangle. The value of this property is ignored if keepAspectRatio is false. The default if false.