Image or other surface containing pixels.
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: a 32-bit representation of the color in the format described by theINT_ARGB
PixelFormat type.the X coordinate of the pixel color to read x, int the Y coordinate of the pixel color to read y)Reads a 32-bit integer representation of the color of a pixel from the specified coordinates in the surface. |
| public Color | |
| public PixelFormat | Returns: thePixelFormat that best describes the underlying
pixelsThis method returns the |
| public < the type of the buffer T extends Buffer> void | getPixels(int
the X coordinate of the rectangular region to read x, int the Y coordinate of the rectangular region to read y, int the width of the rectangular region to read w, int the height of the rectangular region to read h, WritablePixelFormat<T> the pixelformat, T PixelFormat object defining the format
to store the pixels into buffera buffer of a type appropriate for the indicated
buffer, int PixelFormat objectthe distance between the pixel data for the
start of one row of data in the buffer to the start of the
next row of data. scanlineStride)Reads pixel data from a rectangular region of the surface into the specified buffer. |
| public void | getPixels(int
the X coordinate of the rectangular region to read x, int the Y coordinate of the rectangular region to read y, int the width of the rectangular region to read w, int the height of the rectangular region to read h, WritablePixelFormat<ByteBuffer> the pixelformat, byte[] PixelFormat<ByteBuffer> object
defining the byte format to store the pixels into buffera byte array to store the returned pixel data buffer, int the offset into offset, int buffer to store the first
pixel datathe distance between the pixel data for the
start of one row of data in the buffer to the start of the
next row of data scanlineStride)Reads pixel data from a rectangular region of the surface into the specified byte array. |
| public void | getPixels(int
the X coordinate of the rectangular region to read x, int the Y coordinate of the rectangular region to read y, int the width of the rectangular region to read w, int the height of the rectangular region to read h, WritablePixelFormat<IntBuffer> the pixelformat, int[] PixelFormat<IntBuffer> object
defining the int format to store the pixels into buffera int array to store the returned pixel data buffer, int the offset into offset, int buffer to store the first
pixel datathe distance between the pixel data for the
start of one row of data in the buffer to the start of the
next row of data scanlineStride)Reads pixel data from a rectangular region of the surface into the specified int array. |
| getArgb | back to summary |
|---|---|
| public int getArgb(int x, int y) Reads a 32-bit integer representation of the color of a pixel from the specified coordinates in the surface. The 32-bit integer will contain the 4 color components in separate 8-bit fields in ARGB order from the most significant byte to the least significant byte.
| |
| getColor | back to summary |
|---|---|
| public Color getColor(int x, int y) Reads the color of a pixel from the specified coordinates in the
surface and returns the value as a
| |
| getPixelFormat | back to summary |
|---|---|
| public PixelFormat This method returns the
| |
| getPixels | back to summary |
|---|---|
| public <T extends Buffer> void getPixels(int x, int y, int w, int h, WritablePixelFormat<T> pixelformat, T buffer, int scanlineStride) Reads pixel data from a rectangular region of the surface into the
specified buffer.
The format to be used for pixels in the buffer is defined by the
| |
| getPixels | back to summary |
|---|---|
| public void getPixels(int x, int y, int w, int h, WritablePixelFormat<ByteBuffer> pixelformat, byte[] buffer, int offset, int scanlineStride) Reads pixel data from a rectangular region of the surface into the
specified byte array.
The format to be used for pixels in the buffer is defined by the
| |
| getPixels | back to summary |
|---|---|
| public void getPixels(int x, int y, int w, int h, WritablePixelFormat<IntBuffer> pixelformat, int[] buffer, int offset, int scanlineStride) Reads pixel data from a rectangular region of the surface into the
specified int array.
The format to be used for pixels in the buffer is defined by the
| |