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(Point leftTop, Point rightTop, Point rightBottom, Point leftBottom)
      Initializes a new instance of the Quadrangle structure with the describing points.
    • Method Summary

      All Methods Static 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(Point pt)
      Determines if the specified Point is contained within this Quadrangle structure.
      boolean contains(Rect 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.
      boolean equals(Quadrangle other)
      Returns a value indicating whether this instance is equal to a specified Quadrangle value.
      static boolean equals(Quadrangle obj1, Quadrangle obj2) 
      Rect getBoundingRectangle()
      Creates Rectangle bounding this Quadrangle
      Point getLeftBottom()
      Gets left-bottom corner Point of Quadrangle region
      Point getLeftTop()
      Gets left-top corner Point of Quadrangle region
      Point getRightBottom()
      Gets right-bottom corner Point of Quadrangle region
      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.
      static boolean op_Equality(Quadrangle first, Quadrangle second)
      Returns a value indicating whether the first Quadrangle value is equal to the second.
      static boolean op_Inequality(Quadrangle first, Quadrangle second)
      Returns a value indicating if the first Quadrangle value is different from the second.
      void setLeftBottom(Point value)
      Gets left-bottom corner Point of Quadrangle region
      void setLeftTop(Point value)
      Gets left-top corner Point of Quadrangle region
      void setRightBottom(Point value)
      Gets right-bottom corner Point of Quadrangle region
      void setRightTop(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(Point leftTop,
                          Point rightTop,
                          Point rightBottom,
                          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 Point getLeftTop()

        Gets left-top corner Point of Quadrangle region

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

        public void setLeftTop(Point value)

        Gets left-top corner Point of Quadrangle region

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

        public Point getRightTop()

        Gets right-top corner Point of Quadrangle region

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

        public void setRightTop(Point value)

        Gets right-top corner Point of Quadrangle region

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

        public Point getRightBottom()

        Gets right-bottom corner Point of Quadrangle region

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

        public void setRightBottom(Point value)

        Gets right-bottom corner Point of Quadrangle region

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

        public Point getLeftBottom()

        Gets left-bottom corner Point of Quadrangle region

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

        public void setLeftBottom(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(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(Rect 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(Quadrangle other)

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

        Parameters:
        other - 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>.
      • 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 System.Object value to compare to this instance.
        Returns:
        <b>true</b> if obj has the same value as this instance; otherwise, <b>false</b>.
      • op_Equality

        public static boolean op_Equality(Quadrangle first,
                                          Quadrangle second)

        Returns a value indicating whether the first Quadrangle value is equal to the second.

        Parameters:
        first - A first compared value
        second - A second compared value
        Returns:
        <b>true</b> if first has the same value as second; otherwise, <b>false</b>.
      • op_Inequality

        public static boolean op_Inequality(Quadrangle first,
                                            Quadrangle second)

        Returns a value indicating if the first Quadrangle value is different from the second.

        Parameters:
        first - A first compared value
        second - A second compared value
        Returns:
        <b>true</b> if first has the different value from second; 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 Rect getBoundingRectangle()

        Creates Rectangle bounding this Quadrangle

        Returns:
        returns Rectangle bounding this Quadrangle
      • clone

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