Spec-Zone .ru
спецификации, руководства, описания, API
|
public abstract class PixelFormat<T extends java.nio.Buffer>
extends java.lang.Object
PixelFormat
object defines the layout of data for a pixel of
a given format.Modifier and Type | Class and Description |
---|---|
static class |
PixelFormat.Type |
Modifier and Type | Method and Description |
---|---|
static PixelFormat<java.nio.ByteBuffer> |
createByteIndexedInstance(int[] colors) |
static PixelFormat<java.nio.ByteBuffer> |
createByteIndexedPremultipliedInstance(int[] colors) |
abstract int |
getArgb(T buf,
int x,
int y,
int scanlineStride)
Reads a 32-bit integer representation of the color from the buffer
at the specified coordinates.
|
static WritablePixelFormat<java.nio.ByteBuffer> |
getByteBgraInstance() |
static WritablePixelFormat<java.nio.ByteBuffer> |
getByteBgraPreInstance() |
static PixelFormat<java.nio.ByteBuffer> |
getByteRgbInstance() |
static WritablePixelFormat<java.nio.IntBuffer> |
getIntArgbInstance() |
static WritablePixelFormat<java.nio.IntBuffer> |
getIntArgbPreInstance() |
PixelFormat.Type |
getType() |
abstract boolean |
isPremultiplied() |
abstract boolean |
isWritable() |
public static WritablePixelFormat<java.nio.IntBuffer> getIntArgbInstance()
public static WritablePixelFormat<java.nio.IntBuffer> getIntArgbPreInstance()
public static WritablePixelFormat<java.nio.ByteBuffer> getByteBgraInstance()
public static WritablePixelFormat<java.nio.ByteBuffer> getByteBgraPreInstance()
public static PixelFormat<java.nio.ByteBuffer> getByteRgbInstance()
public static PixelFormat<java.nio.ByteBuffer> createByteIndexedPremultipliedInstance(int[] colors)
public static PixelFormat<java.nio.ByteBuffer> createByteIndexedInstance(int[] colors)
public PixelFormat.Type getType()
public abstract boolean isWritable()
public abstract boolean isPremultiplied()
public abstract int getArgb(T buf, int x, int y, int scanlineStride)
buf.get(0)
would return the pixel information for the
pixel at coordinates (0, 0)
.
The scanlineStride
parameter defines the distance from the pixel
data at the start of one row to the pixel data at the start of the
immediately following row at the next higher Y coordinate. Usually,
scanlineStride
is the same as the width of the image multiplied
by the number of data elements per pixel (1 for the case of the
integer and indexed formats, or 3 or 4 in the case of the byte
formats), but some images may have further padding between rows for
alignment or other purposes.buf
- the buffer of pixel datax
- the X coordinate of the pixel to be ready
- the Y coordinate of the pixel to be readscanlineStride
- the number of buffer elements between the
start of adjacent pixel rows in the bufferType.INT_ARGB
pixel formatCopyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. Use is subject to