Package 

Class Boxa


  • 
    public class Boxa
    
                        

    Wrapper for Leptonica's native BOXA.

    • Constructor Summary

      Constructors 
      Constructor Description
      Boxa(long nativeBoxa) Creates a new Box wrapper for the specified native BOX.
    • Method Summary

      Modifier and Type Method Description
      long getNativeBoxa() Returns a pointer to the native Boxa object.
      int getCount()
      Rect getRect(int index) Returns an android.graphics.Rect containing the coordinatesof this box.
      Array<int> getGeometry(int index) Returns an array containing the coordinates of this box.
      boolean getGeometry(int index, @Size(min = 4) Array<int> geometry) Fills an array containing the coordinates of this box.
      synchronized void recycle() Releases resources and frees any memory associated with this Box.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Boxa

        Boxa(long nativeBoxa)
        Creates a new Box wrapper for the specified native BOX.
        Parameters:
        nativeBoxa - A pointer to the native Boxa object.
    • Method Detail

      • getNativeBoxa

         long getNativeBoxa()

        Returns a pointer to the native Boxa object.

      • getGeometry

         Array<int> getGeometry(int index)

        Returns an array containing the coordinates of this box. See INDEX_*constants for indices.

        Parameters:
        index - which box element to refer to
      • getGeometry

         boolean getGeometry(int index, @Size(min = 4) Array<int> geometry)

        Fills an array containing the coordinates of this box. See INDEX_*constants for indices.

        Parameters:
        index - which box element to refer to
        geometry - A 4+ element integer array to fill with coordinates.
      • recycle

         synchronized void recycle()

        Releases resources and frees any memory associated with this Box.