Module bus.extra

Class SVGRender

java.lang.Object
org.miaixz.bus.extra.qrcode.render.SVGRender
All Implemented Interfaces:
BitMatrixRender

public class SVGRender extends Object implements BitMatrixRender
SVG renderer for QR codes.
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Details

    • SVGRender

      public SVGRender(QrConfig qrConfig)
      Constructs an SVGRender with the specified QR code configuration.
      Parameters:
      qrConfig - The QR code configuration.
  • Method Details

    • render

      public void render(com.google.zxing.common.BitMatrix matrix, OutputStream out)
      Description copied from interface: BitMatrixRender
      Renders the given BitMatrix to the specified OutputStream.
      Specified by:
      render in interface BitMatrixRender
      Parameters:
      matrix - The BitMatrix to render.
      out - The OutputStream to write the rendered output to.
    • render

      public void render(com.google.zxing.common.BitMatrix matrix, Appendable writer)
      Renders the given BitMatrix as SVG to the specified Appendable.
      Parameters:
      matrix - The BitMatrix representing the QR code.
      writer - The Appendable to which the SVG will be written.
      Throws:
      org.miaixz.bus.core.lang.exception.InternalException - if an IOException occurs during writing.