-
public class BoxWrapper for Leptonica's native BOX.
-
-
Constructor Summary
Constructors Constructor Description Box(int x, int y, int w, int h)Creates a box with the specified geometry.
-
Method Summary
Modifier and Type Method Description longgetNativeBox()Returns a pointer to the native Box object. intgetX()Returns the box's x-coordinate in pixels. intgetY()Returns the box's y-coordinate in pixels. intgetWidth()Returns the box's width in pixels. intgetHeight()Returns the box's height in pixels. RectgetRect()Returns an android.graphics.Rect containing the coordinatesof this box. Array<int>getGeometry()Returns an array containing the coordinates of this box. booleangetGeometry(@Size(min = 4) Array<int> geometry)Fills an array containing the coordinates of this box. voidrecycle()Releases resources and frees any memory associated with this Box. -
-
Method Detail
-
getNativeBox
long getNativeBox()
Returns a pointer to the native Box object.
-
getX
int getX()
Returns the box's x-coordinate in pixels.
-
getY
int getY()
Returns the box's y-coordinate in pixels.
-
getWidth
int getWidth()
Returns the box's width in pixels.
-
getHeight
int getHeight()
Returns the box's height in pixels.
-
getRect
Rect getRect()
Returns an android.graphics.Rect containing the coordinatesof this box.
-
getGeometry
Array<int> getGeometry()
Returns an array containing the coordinates of this box. See INDEX_*constants for indices.
-
getGeometry
boolean getGeometry(@Size(min = 4) Array<int> geometry)
Fills an array containing the coordinates of this box. See INDEX_*constants for indices.
- Parameters:
geometry- A 4+ element integer array to fill with coordinates.
-
recycle
void recycle()
Releases resources and frees any memory associated with this Box.
-
-
-
-