From 3b78df216018fb6dcc21c1c3f9544461ecde827b Mon Sep 17 00:00:00 2001 From: Christopher Schultz Date: Sat, 17 Feb 2018 21:23:24 -0500 Subject: [PATCH] Remove old toSvgString_old method. Remove main driver with performance comparison. --- java/io/nayuki/qrcodegen/QrCode.java | 80 +--------------------------- 1 file changed, 1 insertion(+), 79 deletions(-) diff --git a/java/io/nayuki/qrcodegen/QrCode.java b/java/io/nayuki/qrcodegen/QrCode.java index 5b0bb56..70978cf 100644 --- a/java/io/nayuki/qrcodegen/QrCode.java +++ b/java/io/nayuki/qrcodegen/QrCode.java @@ -265,44 +265,8 @@ public final class QrCode { } return result; } - - - /** - * Based on the specified number of border modules to add as padding, this returns a - * string whose contents represents an SVG XML file that depicts this QR Code symbol. - * Note that Unix newlines (\n) are always used, regardless of the platform. - * @param border the number of border modules to add, which must be non-negative - * @return a string representing this QR Code as an SVG document - */ - public String toSvgString_old(int border) { - if (border < 0) - throw new IllegalArgumentException("Border must be non-negative"); - StringBuilder sb = new StringBuilder(); - sb.append("\n"); - sb.append("\n"); - sb.append(String.format( - "\n", - size + border * 2)); - sb.append("\t\n"); - sb.append("\t\n"); - sb.append("\n"); - return sb.toString(); - } - /** + /** * Returns a String containing a Scalable Vector Graphic (SVG) that depicts * this QR Code symbol. * @@ -934,46 +898,4 @@ public final class QrCode { } } - - public static void main(String[] args) { - QrCode qr = QrCode.encodeText("Hello, World", Ecc.MEDIUM); - - int iterations; - if(args.length > 0) - iterations = Integer.parseInt(args[0]); - else - iterations = 99999; - - System.out.println("Running benchmark with " + iterations + " iterations..."); - System.out.println("QrCode.toSvgString_old:"); - System.out.flush(); - - long elapsed = System.currentTimeMillis(); - for(int i=0; i