Module bus.extra

Class AsciiArtRender

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

public class AsciiArtRender extends Object implements BitMatrixRender
ASCII Art renderer.
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Details

    • AsciiArtRender

      public AsciiArtRender(QrConfig config)
      Constructs an AsciiArtRender with the specified QR code configuration.
      Parameters:
      config - 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 ASCII Art to the specified Appendable.
      Parameters:
      matrix - The BitMatrix representing the QR code.
      writer - The Appendable to which the ASCII Art will be written.