Package com.microblink.blinkid.geometry

# Class Rectangle

java.lang.Object
com.microblink.blinkid.geometry.Rectangle

All Implemented Interfaces:
  `android.os.Parcelable`

public class Rectangle extends Object implements android.os.Parcelable

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface android.os.Parcelable

  `android.os.Parcelable.ClassLoaderCreator<T extends Object>, android.os.Parcelable.Creator<T extends Object>`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final android.os.Parcelable.Creator<Rectangle>`
  `CREATOR`

  ### Fields inherited from interface android.os.Parcelable

  `CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Rectangle(float x, float y, float width, float height)`
  Rectangle constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `describeContents()`
  `boolean`
  `equals(Object o)`
  `static Rectangle`
  `fromRectF(android.graphics.RectF rectF)`
  `static Rectangle`
  `getDefaultROI()`
  Returns the default rectangle that defines the whole image or view
  `float`
  `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()`
  `String`
  `toString()`
  `void`
  `writeToParcel(android.os.Parcel dest, int flags)`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### CREATOR

    @NonNull public static final android.os.Parcelable.Creator<Rectangle> CREATOR

- ## Constructor Details

  - ### Rectangle

    public Rectangle(float x, float y, float width, float height)
    Rectangle constructor.
    Parameters:
      `x` - top left x coordinate
      `y` - top left y coordinate
      `width` - rectangle width
      `height` - rectangle height

- ## Method Details

  - ### 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 String toString()
    Overrides:
      `toString` in class `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:
      `describeContents` in interface `android.os.Parcelable`

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### writeToParcel

    public void writeToParcel(@NonNull android.os.Parcel dest, int flags)
    Specified by:
      `writeToParcel` in interface `android.os.Parcelable`