com.aspose.barcode.barcoderecognition

Class Quadrangle

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


  • public class Quadrangle
    extends java.lang.Object

    Stores a set of four Points that represent a Quadrangle region.

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static Quadrangle EMPTY
      Represents a Quadrangle structure with its properties left uninitialized.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Quadrangle() 
      Quadrangle(java.awt.Point leftTop, java.awt.Point rightTop, java.awt.Point rightBottom, java.awt.Point leftBottom)
      Initializes a new instance of the Quadrangle structure with the describing points.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      Quadrangle clone() 
      boolean contains(int x, int y)
      Determines if the specified point is contained within this Quadrangle structure.
      boolean contains(java.awt.Point pt)
      Determines if the specified Point is contained within this Quadrangle structure.
      boolean contains(Quadrangle quad)
      Determines if the specified Quadrangle is contained or intersect this Quadrangle structure.
      boolean contains(java.awt.Rectangle rect)
      Determines if the specified Rectangle is contained or intersect this Quadrangle structure.
      boolean equals(java.lang.Object obj)
      Returns a value indicating whether this instance is equal to a specified Quadrangle value.
      java.awt.Rectangle getBoundingRectangle()
      Creates Rectangle bounding this Quadrangle
      java.awt.Point getLeftBottom()
      Gets left-bottom corner Point of Quadrangle region
      java.awt.Point getLeftTop()
      Gets left-top corner Point of Quadrangle region
      java.awt.Point getRightBottom()
      Gets right-bottom corner Point of Quadrangle region
      java.awt.Point getRightTop()
      Gets right-top corner Point of Quadrangle region
      int hashCode()
      Returns the hash code for this instance.
      boolean isEmpty()
      Tests whether all Points of this Quadrangle have values of zero.
      void setLeftBottom(java.awt.Point value)
      Gets left-bottom corner Point of Quadrangle region
      void setLeftTop(java.awt.Point value)
      Gets left-top corner Point of Quadrangle region
      void setRightBottom(java.awt.Point value)
      Gets right-bottom corner Point of Quadrangle region
      void setRightTop(java.awt.Point value)
      Gets right-top corner Point of Quadrangle region
      java.lang.String toString()
      Returns a human-readable string representation of this Quadrangle.
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • EMPTY

        public static final Quadrangle EMPTY

        Represents a Quadrangle structure with its properties left uninitialized.

        Value: Quadrangle
    • Constructor Detail

      • Quadrangle

        public Quadrangle()
      • Quadrangle

        public Quadrangle(java.awt.Point leftTop,
                          java.awt.Point rightTop,
                          java.awt.Point rightBottom,
                          java.awt.Point leftBottom)

        Initializes a new instance of the Quadrangle structure with the describing points.

        Parameters:
        leftTop - A Point that represents the left-top corner of the Quadrangle.
        rightTop - A Point that represents the right-top corner of the Quadrangle.
        rightBottom - A Point that represents the right-bottom corner of the Quadrangle.
        leftBottom - A Point that represents the left-bottom corner of the Quadrangle.
    • Method Detail

      • getLeftTop

        public java.awt.Point getLeftTop()

        Gets left-top corner Point of Quadrangle region

        Value: A left-top corner Point of Quadrangle region
      • setLeftTop

        public void setLeftTop(java.awt.Point value)

        Gets left-top corner Point of Quadrangle region

        Value: A left-top corner Point of Quadrangle region
      • getRightTop

        public java.awt.Point getRightTop()

        Gets right-top corner Point of Quadrangle region

        Value: A right-top corner Point of Quadrangle region
      • setRightTop

        public void setRightTop(java.awt.Point value)

        Gets right-top corner Point of Quadrangle region

        Value: A right-top corner Point of Quadrangle region
      • getRightBottom

        public java.awt.Point getRightBottom()

        Gets right-bottom corner Point of Quadrangle region

        Value: A right-bottom corner Point of Quadrangle region
      • setRightBottom

        public void setRightBottom(java.awt.Point value)

        Gets right-bottom corner Point of Quadrangle region

        Value: A right-bottom corner Point of Quadrangle region
      • getLeftBottom

        public java.awt.Point getLeftBottom()

        Gets left-bottom corner Point of Quadrangle region

        Value: A left-bottom corner Point of Quadrangle region
      • setLeftBottom

        public void setLeftBottom(java.awt.Point value)

        Gets left-bottom corner Point of Quadrangle region

        Value: A left-bottom corner Point of Quadrangle region
      • isEmpty

        public boolean isEmpty()

        Tests whether all Points of this Quadrangle have values of zero.

        Value: Returns <b>true</b> if all Points of this Quadrangle have values of zero; otherwise, <b>false</b>.
      • contains

        public boolean contains(java.awt.Point pt)

        Determines if the specified Point is contained within this Quadrangle structure.

        Parameters:
        pt - The Point to test.
        Returns:
        Returns <b>true</b> if Point is contained within this Quadrangle structure; otherwise, <b>false</b>.
      • contains

        public boolean contains(int x,
                                int y)

        Determines if the specified point is contained within this Quadrangle structure.

        Parameters:
        x - The x point cordinate.
        y - The y point cordinate.
        Returns:
        Returns <b>true</b> if point is contained within this Quadrangle structure; otherwise, <b>false</b>.
      • contains

        public boolean contains(Quadrangle quad)

        Determines if the specified Quadrangle is contained or intersect this Quadrangle structure.

        Parameters:
        quad - The Quadrangle to test.
        Returns:
        Returns <b>true</b> if Quadrangle is contained or intersect this Quadrangle structure; otherwise, <b>false</b>.
      • contains

        public boolean contains(java.awt.Rectangle rect)

        Determines if the specified Rectangle is contained or intersect this Quadrangle structure.

        Parameters:
        rect - The Rectangle to test.
        Returns:
        Returns <b>true</b> if Rectangle is contained or intersect this Quadrangle structure; otherwise, <b>false</b>.
      • equals

        public boolean equals(java.lang.Object obj)

        Returns a value indicating whether this instance is equal to a specified Quadrangle value.

        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - An Quadrangle value to compare to this instance.
        Returns:
        <b>true</b> if obj has the same value as this instance; otherwise, <b>false</b>.
      • hashCode

        public int hashCode()

        Returns the hash code for this instance.

        Overrides:
        hashCode in class java.lang.Object
        Returns:
        A 32-bit signed integer hash code.
      • toString

        public java.lang.String toString()

        Returns a human-readable string representation of this Quadrangle.

        Overrides:
        toString in class java.lang.Object
        Returns:
        A string that represents this Quadrangle.
      • getBoundingRectangle

        public java.awt.Rectangle getBoundingRectangle()

        Creates Rectangle bounding this Quadrangle

        Returns:
        returns Rectangle bounding this Quadrangle
      • clone

        public Quadrangle clone()
        Overrides:
        clone in class java.lang.Object