public class SWTFXUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static int |
alphaOpaque |
private static boolean |
alphaOpaqueCache |
private static java.lang.reflect.Method |
blitDirect |
private static java.lang.reflect.Method |
blitPalette |
private static int |
blitSrc |
private static boolean |
blitSrcCache |
private static java.lang.reflect.Method |
getByteOrderMethod |
private static int |
msbFirst |
private static boolean |
msbFirstCache |
Modifier | Constructor and Description |
---|---|
private |
SWTFXUtils() |
Modifier and Type | Method and Description |
---|---|
private static int |
ALPHA_OPAQUE() |
private static int |
BLIT_SRC() |
private static void |
blit(int op,
byte[] srcData,
int srcDepth,
int srcStride,
int srcOrder,
int srcX,
int srcY,
int srcWidth,
int srcHeight,
byte[] srcReds,
byte[] srcGreens,
byte[] srcBlues,
int alphaMode,
byte[] alphaData,
int alphaStride,
int alphaX,
int alphaY,
byte[] destData,
int destDepth,
int destStride,
int destOrder,
int destX,
int destY,
int destWidth,
int destHeight,
int destRedMask,
int destGreenMask,
int destBlueMask,
boolean flipX,
boolean flipY) |
private static void |
blit(int op,
byte[] srcData,
int srcDepth,
int srcStride,
int srcOrder,
int srcX,
int srcY,
int srcWidth,
int srcHeight,
int srcRedMask,
int srcGreenMask,
int srcBlueMask,
int alphaMode,
byte[] alphaData,
int alphaStride,
int alphaX,
int alphaY,
byte[] destData,
int destDepth,
int destStride,
int destOrder,
int destX,
int destY,
int destWidth,
int destHeight,
int destRedMask,
int destGreenMask,
int destBlueMask,
boolean flipX,
boolean flipY) |
private static byte[] |
convertImage(org.eclipse.swt.graphics.ImageData image) |
static org.eclipse.swt.graphics.ImageData |
fromFXImage(Image image,
org.eclipse.swt.graphics.ImageData imageData)
Snapshots the specified JavaFX
Image object and stores a
copy of its pixels into a new ImageData object. |
private static int |
getByteOrder(org.eclipse.swt.graphics.ImageData image) |
private static int |
MSB_FIRST() |
private static int |
readValue(java.lang.String name) |
static WritableImage |
toFXImage(org.eclipse.swt.graphics.ImageData imageData,
WritableImage image)
Snapshots the specified
ImageData and stores a copy of
its pixels into a JavaFX Image object, creating a new
object if needed. |
private static int blitSrc
private static boolean blitSrcCache
private static int alphaOpaque
private static boolean alphaOpaqueCache
private static int msbFirst
private static boolean msbFirstCache
private static java.lang.reflect.Method blitDirect
private static java.lang.reflect.Method blitPalette
private static java.lang.reflect.Method getByteOrderMethod
public static WritableImage toFXImage(org.eclipse.swt.graphics.ImageData imageData, WritableImage image)
ImageData
and stores a copy of
its pixels into a JavaFX Image
object, creating a new
object if needed.
The returned Image
will be a static snapshot of the state
of the pixels in the ImageData
at the time the method
completes. Further changes to the ImageData
will not
be reflected in the Image
.
The optional JavaFX WritableImage
parameter may be reused
to store the copy of the pixels.
A new Image
will be created if the supplied object is null,
is too small or of a type which the image pixels cannot be easily
converted into.
imageData
- the ImageData
object to be convertedimage
- an optional WritableImage
object that can be
used to store the returned pixel dataImage
object representing a snapshot of the
current pixels in the ImageData
, or null if
the Image
is not readable.public static org.eclipse.swt.graphics.ImageData fromFXImage(Image image, org.eclipse.swt.graphics.ImageData imageData)
Image
object and stores a
copy of its pixels into a new ImageData
object.
The method will only convert a JavaFX Image
that is readable
as per the conditions on the
Image.getPixelReader()
method.
If the Image
is not readable, as determined by its
getPixelReader()
method, then this method will return null.
If the Image
is a writable, or other dynamic image, then
the ImageData
will only be set to the current state of
the pixels in the image as determined by its PixelReader
.
Further changes to the pixels of the Image
will not be
reflected in the returned ImageData
.
The optional ImageData
parameter may be reused to store
the copy of the pixels.
A new ImageData
will be created if the supplied object
is null, is too small or of a type which the image pixels cannot
be easily converted into.
image
- the JavaFX Image
to be convertedimageData
- an optional ImageData
object that may be
used to store the returned pixel dataImageData
containing a snapshot of the JavaFX
Image
, or null if the Image
is not readable.private static int BLIT_SRC() throws java.lang.Exception
java.lang.Exception
private static int ALPHA_OPAQUE() throws java.lang.Exception
java.lang.Exception
private static int MSB_FIRST() throws java.lang.Exception
java.lang.Exception
private static int readValue(java.lang.String name) throws java.lang.Exception
java.lang.Exception
private static void blit(int op, byte[] srcData, int srcDepth, int srcStride, int srcOrder, int srcX, int srcY, int srcWidth, int srcHeight, int srcRedMask, int srcGreenMask, int srcBlueMask, int alphaMode, byte[] alphaData, int alphaStride, int alphaX, int alphaY, byte[] destData, int destDepth, int destStride, int destOrder, int destX, int destY, int destWidth, int destHeight, int destRedMask, int destGreenMask, int destBlueMask, boolean flipX, boolean flipY) throws java.lang.Exception
java.lang.Exception
private static void blit(int op, byte[] srcData, int srcDepth, int srcStride, int srcOrder, int srcX, int srcY, int srcWidth, int srcHeight, byte[] srcReds, byte[] srcGreens, byte[] srcBlues, int alphaMode, byte[] alphaData, int alphaStride, int alphaX, int alphaY, byte[] destData, int destDepth, int destStride, int destOrder, int destX, int destY, int destWidth, int destHeight, int destRedMask, int destGreenMask, int destBlueMask, boolean flipX, boolean flipY) throws java.lang.Exception
java.lang.Exception
private static int getByteOrder(org.eclipse.swt.graphics.ImageData image) throws java.lang.Exception
java.lang.Exception
private static byte[] convertImage(org.eclipse.swt.graphics.ImageData image)