@liquid-js/qr-code-styling
    Preparing search index...

    Interface Plugin

    interface Plugin {
        drawDot?: (args: DrawArgs) => SVGElement | undefined;
        drawCornerDot?: (args: DrawArgs) => SVGElement | undefined;
        drawCornerSquare?: (
            args: DrawArgs,
        ) => readonly [SVGElement, SVGElement] | undefined;
        postProcess?: (svg: SVGSVGElement, options: Options) => void;
    }

    Implemented by

    Index

    Properties

    drawDot?: (args: DrawArgs) => SVGElement | undefined

    Draw a single dot

    Type Declaration

      • (args: DrawArgs): SVGElement | undefined
      • Parameters

        Returns SVGElement | undefined

        Dot element; if undefined, try to use the next plugin or the default function

    drawCornerDot?: (args: DrawArgs) => SVGElement | undefined

    Draw corner dot

    Type Declaration

      • (args: DrawArgs): SVGElement | undefined
      • Parameters

        Returns SVGElement | undefined

        Corner dot element; if undefined, try to use the next plugin or the default function

    drawCornerSquare?: (
        args: DrawArgs,
    ) => readonly [SVGElement, SVGElement] | undefined

    Draw corner square

    Type Declaration

      • (args: DrawArgs): readonly [SVGElement, SVGElement] | undefined
      • Parameters

        Returns readonly [SVGElement, SVGElement] | undefined

        Corner square element and corner mask (used with ImageMode.background); if undefined, try to use the next plugin or the default function

    postProcess?: (svg: SVGSVGElement, options: Options) => void

    Alter the generated SVG, e.g. add borders