NormalizedRectangle Class

public class NormalizedRectangle
extends StructuredValue

Defines a region of an image. The region is defined by the coordinates of the top, left corner and bottom, right corner of the region. The coordinates are fractional values of the original image's width and height in the range 0.0 through 1.0.

Constructor Summary

Constructor Description
NormalizedRectangle()

Method Summary

Modifier and Type Method and Description
double bottom()

Get the bottom value.

double left()

Get the left value.

double right()

Get the right value.

double top()

Get the top value.

NormalizedRectangle withBottom(double bottom)

Set the bottom value.

NormalizedRectangle withLeft(double left)

Set the left value.

NormalizedRectangle withRight(double right)

Set the right value.

NormalizedRectangle withTop(double top)

Set the top value.

Methods inherited from Identifiable

id

Methods inherited from Response

Methods inherited from Thing

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

NormalizedRectangle

public NormalizedRectangle()

Method Details

bottom

public double bottom()

Get the bottom value.

Returns:

the bottom value

left

public double left()

Get the left value.

Returns:

the left value

right

public double right()

Get the right value.

Returns:

the right value

top

public double top()

Get the top value.

Returns:

the top value

withBottom

public NormalizedRectangle withBottom(double bottom)

Set the bottom value.

Parameters:

bottom - the bottom value to set

Returns:

the NormalizedRectangle object itself.

withLeft

public NormalizedRectangle withLeft(double left)

Set the left value.

Parameters:

left - the left value to set

Returns:

the NormalizedRectangle object itself.

withRight

public NormalizedRectangle withRight(double right)

Set the right value.

Parameters:

right - the right value to set

Returns:

the NormalizedRectangle object itself.

withTop

public NormalizedRectangle withTop(double top)

Set the top value.

Parameters:

top - the top value to set

Returns:

the NormalizedRectangle object itself.

Applies to