From 99ca70d7f301c45429f9d4c62e127c20f2bd2649 Mon Sep 17 00:00:00 2001 From: flyashi Date: Thu, 29 Jul 2010 18:54:36 +0000 Subject: [PATCH] Java CommandLineRunner: print result points git-svn-id: https://zxing.googlecode.com/svn/trunk@1496 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- .../com/google/zxing/client/j2se/CommandLineRunner.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/javase/src/com/google/zxing/client/j2se/CommandLineRunner.java b/javase/src/com/google/zxing/client/j2se/CommandLineRunner.java index 8b7edd00e..235a80d84 100644 --- a/javase/src/com/google/zxing/client/j2se/CommandLineRunner.java +++ b/javase/src/com/google/zxing/client/j2se/CommandLineRunner.java @@ -28,6 +28,7 @@ import com.google.zxing.client.result.ResultParser; import com.google.zxing.common.BitArray; import com.google.zxing.common.BitMatrix; import com.google.zxing.common.HybridBinarizer; +import com.google.zxing.ResultPoint; import java.awt.image.BufferedImage; import java.io.File; @@ -238,6 +239,13 @@ public final class CommandLineRunner { System.out.println(uri.toString() + " (format: " + result.getBarcodeFormat() + ", type: " + parsedResult.getType() + "):\nRaw result:\n" + result.getText() + "\nParsed result:\n" + parsedResult.getDisplayResult()); + + System.out.println("Also, there were " + result.getResultPoints().length + " result points."); + for (int i = 0; i < result.getResultPoints().length; i++) { + ResultPoint rp = result.getResultPoints()[i]; + System.out.println(" Point " + i + ": (" + rp.getX() + "," + rp.getY() + ")"); + } + return result; } catch (NotFoundException nfe) { System.out.println(uri.toString() + ": No barcode found");