Top Description Constructors Methods
com.sun.glass.ui.monocle

pack-priv Class NativeCursors

extends Object
Class Inheritance
Imports
java.nio.Buffer, .ByteBuffer, .IntBuffer, .ShortBuffer

Utilities for use by native cursor implementations

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static void
colorKeyCursor(byte[]
the cursor pixels
source
,
Buffer
a target ShortBuffer or IntBuffer
dest
,
int
the depth of the target format (16 or 32)
targetDepth
,
int
the color key used for transparent pixels
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, ShortBuffer destBuffer, int transparentPixel)

private static void
colorKeyCursor32(byte[] source, IntBuffer destBuffer, int transparentPixel)

pack-priv static void
offsetCursor(Buffer
The original cursor to be shifted
sourceBuffer
,
Buffer
A buffer to receive the shifted cursor
destBuffer
,
int
the number of pixels the cursor is to be shifted right
offsetX
,
int
the number of pixels the cursor is to be shifted down
offsetY
,
int
the pixel width of the cursor
width
,
int
the pixel height of the cursor
height
,
int
the pixel depth of the cursor (16 or 32)
depth
,
int
the color key used for transparent pixels
transparentPixel
)

Creates a shifted version of the source cursor.

private static void
offsetCursor16(ShortBuffer sourceBuffer, ShortBuffer destBuffer, int offsetX, int offsetY, int width, int height, int transparentPixel)

private static void
offsetCursor32(IntBuffer sourceBuffer, IntBuffer destBuffer, int offsetX, int offsetY, int width, int height, int transparentPixel)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

NativeCursorsback to summary
pack-priv NativeCursors()

Method Detail

colorKeyCursorback to summary
pack-priv static void colorKeyCursor(byte[] source, 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

Parameters
source:byte[]

the cursor pixels

dest:Buffer

a target ShortBuffer or IntBuffer

targetDepth:int

the depth of the target format (16 or 32)

transparentPixel:int

the color key used for transparent pixels

colorKeyCursor16back to summary
private static void colorKeyCursor16(byte[] source, ShortBuffer destBuffer, int transparentPixel)
colorKeyCursor32back to summary
private static void colorKeyCursor32(byte[] source, IntBuffer destBuffer, int transparentPixel)
offsetCursorback to summary
pack-priv static void offsetCursor(Buffer sourceBuffer, Buffer destBuffer, int offsetX, int offsetY, int width, int height, int depth, int transparentPixel)

Creates a shifted version of the source cursor. Buffers must be ShortBuffers for a bit depth of 16 or IntBuffers for a bit depth of 32.

Parameters
sourceBuffer:Buffer

The original cursor to be shifted

destBuffer:Buffer

A buffer to receive the shifted cursor

offsetX:int

the number of pixels the cursor is to be shifted right

offsetY:int

the number of pixels the cursor is to be shifted down

width:int

the pixel width of the cursor

height:int

the pixel height of the cursor

depth:int

the pixel depth of the cursor (16 or 32)

transparentPixel:int

the color key used for transparent pixels

offsetCursor16back to summary
private static void offsetCursor16(ShortBuffer sourceBuffer, ShortBuffer destBuffer, int offsetX, int offsetY, int width, int height, int transparentPixel)
offsetCursor32back to summary
private static void offsetCursor32(IntBuffer sourceBuffer, IntBuffer destBuffer, int offsetX, int offsetY, int width, int height, int transparentPixel)