javax.media.nativewindow.util
Class PixelFormatUtil
java.lang.Object
javax.media.nativewindow.util.PixelFormatUtil
public class PixelFormatUtil
- extends Object
Pixel Rectangle Utilities.
All conversion methods are endian independent.
|
Method Summary |
static void |
convert32(PixelFormatUtil.PixelSink32 dest32,
ByteBuffer src_bb,
PixelFormat src_fmt,
boolean src_glOriented,
int width,
int height,
int stride_bytes)
|
static void |
convert32(PixelFormatUtil.PixelSink32 destInt32,
PixelRectangle src)
|
static PixelRectangle |
convert32(PixelRectangle src,
PixelFormat destFmt,
int ddestStride,
boolean isGLOriented,
boolean destIsDirect)
|
static int |
convertToInt32(PixelFormat dest_fmt,
byte r,
byte g,
byte b,
byte a)
|
static int |
convertToInt32(PixelFormat dest_fmt,
PixelFormat src_fmt,
ByteBuffer src,
int srcOff)
|
static int |
convertToInt32(PixelFormat dest_fmt,
PixelFormat src_fmt,
int src_pixel)
|
static PixelFormat |
getReversed(PixelFormat fmt)
Returns the PixelFormat with reversed components of fmt. |
static int |
getValue32(PixelFormat src_fmt,
ByteBuffer src,
int srcOff)
|
PixelFormatUtil
public PixelFormatUtil()
getReversed
public static PixelFormat getReversed(PixelFormat fmt)
- Returns the
PixelFormat with reversed components of fmt.
If no reversed PixelFormat is available, returns fmt.
getValue32
public static int getValue32(PixelFormat src_fmt,
ByteBuffer src,
int srcOff)
convertToInt32
public static int convertToInt32(PixelFormat dest_fmt,
byte r,
byte g,
byte b,
byte a)
convertToInt32
public static int convertToInt32(PixelFormat dest_fmt,
PixelFormat src_fmt,
ByteBuffer src,
int srcOff)
convertToInt32
public static int convertToInt32(PixelFormat dest_fmt,
PixelFormat src_fmt,
int src_pixel)
convert32
public static PixelRectangle convert32(PixelRectangle src,
PixelFormat destFmt,
int ddestStride,
boolean isGLOriented,
boolean destIsDirect)
convert32
public static void convert32(PixelFormatUtil.PixelSink32 destInt32,
PixelRectangle src)
convert32
public static void convert32(PixelFormatUtil.PixelSink32 dest32,
ByteBuffer src_bb,
PixelFormat src_fmt,
boolean src_glOriented,
int width,
int height,
int stride_bytes)
- Parameters:
dest32 - 32bit pixel sinksrc_bb - src_fmt - src_glOriented - if true, the source memory is laid out in OpenGL's coordinate system, origin at bottom left,
otherwise origin at top left.width - height - strideInBytes - stride in byte-size, i.e. byte count from one line to the next.
If zero, stride is set to width * bytes-per-pixel.
If not zero, value must be >= width * bytes-per-pixel.stride_bytes - stride in byte-size, i.e. byte count from one line to the next.
Must be >= src_fmt.bytesPerPixel() * width.
- Throws:
IllegalArgumentException - if strideInBytes is invalid
Copyright 2010 JogAmp Community.