com.aspose.barcode.barcoderecognition

Class BarCodeRegion

  • java.lang.Object
    • com.aspose.barcode.barcoderecognition.BarCodeRegion

  • Deprecated. 
    This class is obsolete. Use BarCodeRegionParameters instead.

    @Deprecated
    public final class BarCodeRegion
    extends java.lang.Object

    Represents the barcode's region.


     Draw edges of the barcode region, then fill it.
     
     BarCodeReader reader;
     reader = new BarCodeReader("c:\\test.jpg",BarCodeReadType.CODE_39_STANDARD);
     int counter = 0;
     while(reader.read())
     {
         System.out.println("BarCode Type: " + reader.getReadType());
         System.out.println("BarCode CodeText: " + reader.getCodeText());
         BarCodeRegion region = reader.getRegion();
         if(region != null)
         {
             BufferedImage img = ImageIO.read(file);
             Graphics g = img.createGraphics(img);
             region.drawBarCodeEdges(g, new Pen(Color.getRed(),1f));
             ImageIO.write(img, "PNG", new File(".\\edge_" + counter++ +".png"));
             region.fillBarCodeRegion(g, Color.GREEN);
             ImageIO.write(img, "PNG", new File(".\fill_" + counter + ".png"));
         }
     }
     reader.Close();
     
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method and Description
      void drawBarCodeEdges(java.awt.Graphics g, java.awt.Color pen)
      Deprecated. 
      Draws the bar code edges.
      void fillBarCodeRegion(java.awt.Graphics g, java.awt.Color brush)
      Deprecated. 
      Fills the bar code region.
      java.awt.Point[] getPoints()
      Deprecated. 
      Gets the points of the region.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getPoints

        public java.awt.Point[] getPoints()
        Deprecated. 

        Gets the points of the region.

      • drawBarCodeEdges

        public void drawBarCodeEdges(java.awt.Graphics g,
                                     java.awt.Color pen)
        Deprecated. 

        Draws the bar code edges.

        Parameters:
        g - The graphics.
        pen - Pen that determines the color, width, and style of the polygon.
      • fillBarCodeRegion

        public void fillBarCodeRegion(java.awt.Graphics g,
                                      java.awt.Color brush)
        Deprecated. 

        Fills the bar code region.

        Parameters:
        g - The graphics.
        brush - The brush.