Пример #1
0
 internal virtual DecodeResult decode(QRCodeImage qrCodeImage, Point adjust)
 {
     try
     {
         if (numTryDecode == 0)
         {
             canvas.println("Decoding started");
             int[][] intImage = imageToIntArray(qrCodeImage);
             imageReader  = new QRCodeImageReader();
             qrCodeSymbol = imageReader.getQRCodeSymbol(intImage);
         }
         else
         {
             canvas.println("--");
             canvas.println("Decoding restarted #" + (numTryDecode));
             qrCodeSymbol = imageReader.getQRCodeSymbolWithAdjustedGrid(adjust);
         }
     }
     catch (SymbolNotFoundException e)
     {
         throw new DecodingFailedException(e.Message);
     }
     canvas.println("Created QRCode symbol.");
     canvas.println("Reading symbol.");
     canvas.println("Version: " + qrCodeSymbol.VersionReference);
     canvas.println("Mask pattern: " + qrCodeSymbol.MaskPatternRefererAsString);
     // blocks contains all (data and RS) blocks in QR Code symbol
     int[] blocks = qrCodeSymbol.Blocks;
     canvas.println("Correcting data errors.");
     // now blocks turn to data blocks (corrected and extracted from original blocks)
     blocks = correctDataBlocks(blocks);
     try
     {
         sbyte[] decodedByteArray = getDecodedByteArray(blocks, qrCodeSymbol.Version, qrCodeSymbol.NumErrorCollectionCode);
         return(new DecodeResult(this, decodedByteArray, numLastCorrections, correctionSucceeded));
     }
     catch (InvalidDataBlockException e)
     {
         canvas.println(e.Message);
         throw new DecodingFailedException(e.Message);
     }
 }
Пример #2
0
		public virtual void  drawPolygon(Point[] points, int color)
		{
		}
Пример #3
0
		public virtual void  drawCross(Point point, int color)
		{
		}
Пример #4
0
		public virtual void  drawPoint(Point point, int color)
		{
		}
 public void drawPoints(Point[] points, int color)
 {
 }
 public void drawPoint(Point point, int color)
 {
 }
Пример #7
0
 internal virtual DecodeResult Decode(QRCodeImage qrCodeImage, Point adjust)
 {
     try
     {
         if (numTryDecode == 0)
         {
             canvas.Print("Decoding started");
             int[][] intImage = imageToIntArray(qrCodeImage);
             imageReader = new QRCodeImageReader();
             qrCodeSymbol = imageReader.GetQRCodeSymbol(intImage);
         }
         else
         {
             canvas.Print("--");
             canvas.Print("Decoding restarted #" + (numTryDecode));
             qrCodeSymbol = imageReader.GetQRCodeSymbolWithAdjustedGrid(adjust);
         }
     }
     catch (SymbolNotFoundException e)
     {
         throw new DecodingFailedException(e.Message);
     }
     canvas.Print("Created QRCode symbol.");
     canvas.Print("Reading symbol.");
     canvas.Print("Version: " + qrCodeSymbol.VersionReference);
     canvas.Print("Mask pattern: " + qrCodeSymbol.MaskPatternRefererAsString);
     // blocks contains all (data and RS) blocks in QR Code symbol
     int[] blocks = qrCodeSymbol.Blocks;
     canvas.Print("Correcting data errors.");
     // now blocks turn to data blocks (corrected and extracted from original blocks)
     blocks = CorrectDataBlocks(blocks);
     try
     {
         sbyte[] decodedByteArray = GetDecodedByteArray(blocks, qrCodeSymbol.Version, qrCodeSymbol.NumErrorCollectionCode);
         return new DecodeResult(this, decodedByteArray, numLastCorrectionFailures);
     }
     catch (InvalidDataBlockException e)
     {
         canvas.Print(e.Message);
         throw new DecodingFailedException(e.Message);
     }
 }
Пример #8
0
 public void DrawPolygon(Point[] points, int color)
 {
 }
Пример #9
0
 public void DrawCross(Point point, int color)
 {
 }
Пример #10
0
 public virtual void  drawCross(Point point, int color)
 {
 }
Пример #11
0
 public virtual void  drawPoint(Point point, int color)
 {
 }
Пример #12
0
 public void drawPoint(Point point, int color)
 {
 }
Пример #13
0
 public virtual void DrawPoints(Point[] points, int color)
 {
 }