Houjie
2025-07-24 52a3ff1bce1417b39f6872d8e8cb378e9c2ccc6f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import EncodeHintType from '../core/EncodeHintType';
/**
 * @deprecated Moving to @zxing/browser
 */
declare abstract class BrowserSvgCodeWriter {
    /**
     * Default quiet zone in pixels.
     */
    private static readonly QUIET_ZONE_SIZE;
    /**
     * SVG markup NameSpace
     */
    private static readonly SVG_NS;
    /**
     * A HTML container element for the image.
     */
    private containerElement;
    /**
     * Constructs. 😉
     */
    constructor(containerElement: string | HTMLElement);
    /**
     * Writes the QR code to a SVG and renders it in the container.
     */
    write(contents: string, width: number, height: number, hints?: Map<EncodeHintType, any>): SVGSVGElement;
    /**
     * Encodes the content to a Barcode type.
     */
    private encode;
    /**
     * Renders the SVG in the container.
     *
     * @note the input matrix uses 0 == white, 1 == black. The output matrix uses 0 == black, 255 == white (i.e. an 8 bit greyscale bitmap).
     */
    private renderResult;
    /**
     * Creates a SVG element.
     */
    protected createSVGElement(w: number, h: number): SVGSVGElement;
    /**
     * Creates a SVG rect.
     */
    protected createSvgPathPlaceholderElement(w: number, h: number): SVGPathElement;
    /**
     * Creates a SVG rect.
     */
    protected createSvgRectElement(x: number, y: number, w: number, h: number): SVGRectElement;
}
export { BrowserSvgCodeWriter };