class NativeCursors
extends java.lang.Object
Constructor and Description |
---|
NativeCursors() |
Modifier and Type | Method and Description |
---|---|
(package private) static void |
colorKeyCursor(byte[] source,
java.nio.Buffer dest,
int targetDepth,
int transparentPixel)
Convert a cursor in 32-bit BYTE_ARGB_PRE format to a 16-bit or 32-bit
color-keyed format
|
private static void |
colorKeyCursor16(byte[] source,
java.nio.ShortBuffer destBuffer,
int transparentPixel) |
private static void |
colorKeyCursor32(byte[] source,
java.nio.IntBuffer destBuffer,
int transparentPixel) |
(package private) static void |
offsetCursor(java.nio.Buffer sourceBuffer,
java.nio.Buffer destBuffer,
int offsetX,
int offsetY,
int width,
int height,
int depth,
int transparentPixel)
Creates a shifted version of the source cursor.
|
private static void |
offsetCursor16(java.nio.ShortBuffer sourceBuffer,
java.nio.ShortBuffer destBuffer,
int offsetX,
int offsetY,
int width,
int height,
int transparentPixel) |
private static void |
offsetCursor32(java.nio.IntBuffer sourceBuffer,
java.nio.IntBuffer destBuffer,
int offsetX,
int offsetY,
int width,
int height,
int transparentPixel) |
static void colorKeyCursor(byte[] source, java.nio.Buffer dest, int targetDepth, int transparentPixel)
source
- the cursor pixelsdest
- a target ShortBuffer or IntBuffertargetDepth
- the depth of the target format (16 or 32)transparentPixel
- the color key used for transparent pixelsstatic void offsetCursor(java.nio.Buffer sourceBuffer, java.nio.Buffer destBuffer, int offsetX, int offsetY, int width, int height, int depth, int transparentPixel)
sourceBuffer
- The original cursor to be shifteddestBuffer
- A buffer to receive the shifted cursoroffsetX
- the number of pixels the cursor is to be shifted rightoffsetY
- the number of pixels the cursor is to be shifted downwidth
- the pixel width of the cursorheight
- the pixel height of the cursordepth
- the pixel depth of the cursor (16 or 32)transparentPixel
- the color key used for transparent pixelsprivate static void colorKeyCursor32(byte[] source, java.nio.IntBuffer destBuffer, int transparentPixel)
private static void colorKeyCursor16(byte[] source, java.nio.ShortBuffer destBuffer, int transparentPixel)
private static void offsetCursor32(java.nio.IntBuffer sourceBuffer, java.nio.IntBuffer destBuffer, int offsetX, int offsetY, int width, int height, int transparentPixel)
private static void offsetCursor16(java.nio.ShortBuffer sourceBuffer, java.nio.ShortBuffer destBuffer, int offsetX, int offsetY, int width, int height, int transparentPixel)