Representación en Java de un objeto nativo PIX en Leptonica. Más...
Métodos públicos | |
Pix (int nativePix) | |
Creates a new Pix wrapper for the specified native PIX object. Never call this twice on the same native pointer, because finalize() will attempt to free native memory twice. | |
Pix (int width, int height, int depth) | |
Pix | clone () |
Returns a clone of this Pix. This does NOT create a separate copy, just a new pointer that can be recycled without affecting other clones. | |
Pix | copy () |
Returns a deep copy of this Pix that can be modified without affecting the original Pix. | |
byte[] | getData () |
Return the raw bytes of the native PIX object. You can reconstruct the Pix from this data using createFromPix(). | |
int | getDepth () |
Returns the depth of this Pix. | |
int[] | getDimensions () |
Returns an array of this image's dimensions. See Pix.INDEX_* for indices. | |
boolean | getDimensions (int[] dimensions) |
Fills an array with this image's dimensions. The array must be at least 3 elements long. | |
int | getHeight () |
Returns the height of this Pix. | |
int | getNativePix () |
Returns a pointer to the native Pix object. This is used by native code and is only valid within the same process in which the Pix was created. | |
int | getPixel (int x, int y) |
Returns the android.graphics.Color at the specified location. | |
Rect | getRect () |
Returns a Rect with the width and height of this Pix. | |
int | getWidth () |
Returns the width of this Pix. | |
boolean | invert () |
Inverts this Pix in-place. | |
void | recycle () |
Releases resources and frees any memory associated with this Pix. You may not modify or access the pix after calling this method. | |
void | setPixel (int x, int y, int color) |
Sets the android.graphics.Color at the specified location. | |
Métodos públicos estáticos | |
static Pix | createFromPix (byte[] pixData, int width, int height, int depth) |
Creates a new Pix from raw Pix data obtained from getData(). | |
Atributos públicos estáticos | |
static final int | INDEX_D = 2 |
Index of the image bit-depth within the dimensions array. | |
static final int | INDEX_H = 1 |
Index of the image height within the dimensions array. | |
static final int | INDEX_W = 0 |
Index of the image width within the dimensions array. | |
Métodos protegidos | |
void | finalize () throws Throwable |
Funciones estáticas del 'package' | |
[static initializer] | |
Atributos del 'package' | |
final int | mNativePix |
Package-accessible pointer to native pix. | |
Métodos privados estáticos | |
static native int | nativeClone (int nativePix) |
static native int | nativeCopy (int nativePix) |
static native int | nativeCreateFromData (byte[] data, int w, int h, int d) |
static native int | nativeCreatePix (int w, int h, int d) |
static native void | nativeDestroy (int nativePix) |
static native boolean | nativeGetData (int nativePix, byte[] data) |
static native int | nativeGetDataSize (int nativePix) |
static native int | nativeGetDepth (int nativePix) |
static native boolean | nativeGetDimensions (int nativePix, int[] dimensions) |
static native int | nativeGetHeight (int nativePix) |
static native int | nativeGetPixel (int nativePix, int x, int y) |
static native int | nativeGetWidth (int nativePix) |
static native boolean | nativeInvert (int nativePix) |
static native void | nativeSetPixel (int nativePix, int x, int y, int color) |
Atributos privados | |
boolean | mRecycled |
Representación en Java de un objeto nativo PIX en Leptonica.
com.googlecode.leptonica.android.Pix.Pix | ( | int | nativePix | ) |
Creates a new Pix wrapper for the specified native PIX object. Never call this twice on the same native pointer, because finalize() will attempt to free native memory twice.
nativePix | A pointer to the native PIX object. |
Definición en la línea 61 del archivo Pix.java.
com.googlecode.leptonica.android.Pix.Pix | ( | int | width, |
int | height, | ||
int | depth | ||
) |
com.googlecode.leptonica.android.Pix.[static initializer] | ( | ) | [static, package] |
static Pix com.googlecode.leptonica.android.Pix.createFromPix | ( | byte[] | pixData, |
int | width, | ||
int | height, | ||
int | depth | ||
) | [static] |
Creates a new Pix from raw Pix data obtained from getData().
pixData | Raw pix data obtained from getData(). |
width | The width of the original Pix. |
height | The height of the original Pix. |
depth | The bit-depth of the original Pix. |
null
on error Definición en la línea 213 del archivo Pix.java.
void com.googlecode.leptonica.android.Pix.finalize | ( | ) | throws Throwable [protected] |
byte [] com.googlecode.leptonica.android.Pix.getData | ( | ) |
Return the raw bytes of the native PIX object. You can reconstruct the Pix from this data using createFromPix().
Definición en la línea 97 del archivo Pix.java.
boolean com.googlecode.leptonica.android.Pix.getDimensions | ( | int[] | dimensions | ) |
int com.googlecode.leptonica.android.Pix.getPixel | ( | int | x, |
int | y | ||
) |
Returns the android.graphics.Color at the specified location.
x | The x coordinate (0...width-1) of the pixel to return. |
y | The y coordinate (0...height-1) of the pixel to return. |
IllegalArgumentException | If x, y exceeds the image bounds. |
Definición en la línea 276 del archivo Pix.java.
boolean com.googlecode.leptonica.android.Pix.invert | ( | ) |
static native int com.googlecode.leptonica.android.Pix.nativeClone | ( | int | nativePix | ) | [static, private] |
static native int com.googlecode.leptonica.android.Pix.nativeCopy | ( | int | nativePix | ) | [static, private] |
static native int com.googlecode.leptonica.android.Pix.nativeCreateFromData | ( | byte[] | data, |
int | w, | ||
int | h, | ||
int | d | ||
) | [static, private] |
static native int com.googlecode.leptonica.android.Pix.nativeCreatePix | ( | int | w, |
int | h, | ||
int | d | ||
) | [static, private] |
static native void com.googlecode.leptonica.android.Pix.nativeDestroy | ( | int | nativePix | ) | [static, private] |
static native boolean com.googlecode.leptonica.android.Pix.nativeGetData | ( | int | nativePix, |
byte[] | data | ||
) | [static, private] |
static native int com.googlecode.leptonica.android.Pix.nativeGetDataSize | ( | int | nativePix | ) | [static, private] |
static native int com.googlecode.leptonica.android.Pix.nativeGetDepth | ( | int | nativePix | ) | [static, private] |
static native boolean com.googlecode.leptonica.android.Pix.nativeGetDimensions | ( | int | nativePix, |
int[] | dimensions | ||
) | [static, private] |
static native int com.googlecode.leptonica.android.Pix.nativeGetHeight | ( | int | nativePix | ) | [static, private] |
static native int com.googlecode.leptonica.android.Pix.nativeGetPixel | ( | int | nativePix, |
int | x, | ||
int | y | ||
) | [static, private] |
static native int com.googlecode.leptonica.android.Pix.nativeGetWidth | ( | int | nativePix | ) | [static, private] |
static native boolean com.googlecode.leptonica.android.Pix.nativeInvert | ( | int | nativePix | ) | [static, private] |
static native void com.googlecode.leptonica.android.Pix.nativeSetPixel | ( | int | nativePix, |
int | x, | ||
int | y, | ||
int | color | ||
) | [static, private] |
void com.googlecode.leptonica.android.Pix.setPixel | ( | int | x, |
int | y, | ||
int | color | ||
) |
Sets the android.graphics.Color at the specified location.
x | The x coordinate (0...width-1) of the pixel to set. |
y | The y coordinate (0...height-1) of the pixel to set. |
color | The argb android.graphics.Color to set at the specified coordinate. |
IllegalArgumentException | If x, y exceeds the image bounds. |
Definición en la línea 301 del archivo Pix.java.
final int com.googlecode.leptonica.android.Pix.INDEX_D = 2 [static] |
final int com.googlecode.leptonica.android.Pix.INDEX_H = 1 [static] |
final int com.googlecode.leptonica.android.Pix.INDEX_W = 0 [static] |
final int com.googlecode.leptonica.android.Pix.mNativePix [package] |
boolean com.googlecode.leptonica.android.Pix.mRecycled [private] |