Package com.ardor3d.image.util
Class SWTImageUtil
java.lang.Object
com.ardor3d.image.util.SWTImageUtil
Utility methods for converting Ardor3D Images to SWT ImageData.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic List
<org.eclipse.swt.graphics.ImageData> convertToSWT
(Image input) Convert the given Ardor3D Image to a List of ImageData objects.static List
<org.eclipse.swt.graphics.ImageData> convertToSWT
(Image input, org.eclipse.swt.graphics.Color tint, double alphaTint) Convert the given Ardor3D Image to a List of ImageData objects.
-
Constructor Details
-
SWTImageUtil
public SWTImageUtil()
-
-
Method Details
-
convertToSWT
Convert the given Ardor3D Image to a List of ImageData objects. It is a List because Ardor3D Images may contain multiple layers (for example, in the case of cube maps or 3D textures).- Parameters:
input
- the Ardor3D Image to convert- Returns:
- the ImageData object(s) created in the conversion
-
convertToSWT
public static List<org.eclipse.swt.graphics.ImageData> convertToSWT(Image input, org.eclipse.swt.graphics.Color tint, double alphaTint) Convert the given Ardor3D Image to a List of ImageData objects. It is a List because Ardor3D Images may contain multiple layers (for example, in the case of cube maps or 3D textures). The given SWT Color is used to modulate or "tint" the returned image. TODO: Add support for more formats.
XXX: Note that only images of data type ImageDataType.UnsignedByte and ImageDataFormat of RGB or RGBA are currently supported.- Parameters:
input
- the Ardor3D Image to converttint
- the Color to apply to the generated imagealphaTint
- the alpha coefficient- Returns:
- the ImageData object(s) created in the conversion
-