Class Rectangle
- java.lang.Object
-
- com.microblink.documentverification.geometry.Rectangle
-
- All Implemented Interfaces:
android.os.Parcelable
public class Rectangle extends java.lang.Object implements android.os.Parcelable
-
-
Constructor Summary
Constructors Constructor Description Rectangle(float x, float y, float width, float height)Rectangle constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intdescribeContents()booleanequals(java.lang.Object o)static RectanglefromRectF(android.graphics.RectF rectF)static RectanglegetDefaultROI()Returns the default rectangle that defines the whole image or viewfloatgetHeight()floatgetWidth()floatgetX()floatgetY()inthashCode()booleanisRelative()Return true if rectangle is given in relative coordinates.voidlog()voidnormalizeToUnitRectangle()android.graphics.RectFtoRectF()java.lang.StringtoString()voidwriteToParcel(android.os.Parcel dest, int flags)
-
-
-
Field Detail
-
CREATOR
@NonNull public static final android.os.Parcelable.Creator<Rectangle> CREATOR
-
-
Method Detail
-
isRelative
public boolean isRelative()
Return true if rectangle is given in relative coordinates. Relative coordinates mean that each coordinate is given as percentage.- Returns:
- true if rectangle is given in relative coordinates
-
getDefaultROI
@NonNull public static Rectangle getDefaultROI()
Returns the default rectangle that defines the whole image or view- Returns:
- the default rectangle that defines the whole image or view
-
toString
@NonNull public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
log
public void log()
-
normalizeToUnitRectangle
public void normalizeToUnitRectangle()
-
toRectF
@NonNull public android.graphics.RectF toRectF()
-
fromRectF
public static Rectangle fromRectF(android.graphics.RectF rectF)
-
getX
public float getX()
- Returns:
- the x
-
getY
public float getY()
- Returns:
- the y
-
getWidth
public float getWidth()
- Returns:
- the width
-
getHeight
public float getHeight()
- Returns:
- the height
-
describeContents
public int describeContents()
- Specified by:
describeContentsin interfaceandroid.os.Parcelable
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
writeToParcel
public void writeToParcel(@NonNull android.os.Parcel dest, int flags)- Specified by:
writeToParcelin interfaceandroid.os.Parcelable
-
-