Package com.microblink.geometry
Class Rectangle
- java.lang.Object
-
- com.microblink.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 int
describeContents()
boolean
equals(java.lang.Object o)
static Rectangle
getDefaultROI()
Returns the default rectangle that defines the whole image or viewfloat
getHeight()
float
getWidth()
float
getX()
float
getY()
int
hashCode()
boolean
isRelative()
Return true if rectangle is given in relative coordinates.void
log()
void
normalizeToUnitRectangle()
android.graphics.RectF
toRectF()
java.lang.String
toString()
void
writeToParcel(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:
toString
in classjava.lang.Object
-
log
public void log()
-
normalizeToUnitRectangle
public void normalizeToUnitRectangle()
-
toRectF
@NonNull public android.graphics.RectF toRectF()
-
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:
describeContents
in interfaceandroid.os.Parcelable
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
writeToParcel
public void writeToParcel(@NonNull android.os.Parcel dest, int flags)
- Specified by:
writeToParcel
in interfaceandroid.os.Parcelable
-
-