Class SWTImageUtil

java.lang.Object
com.ardor3d.image.util.SWTImageUtil

public abstract class SWTImageUtil extends Object
Utility methods for converting Ardor3D Images to SWT ImageData.
  • Constructor Details

    • SWTImageUtil

      public SWTImageUtil()
  • Method Details

    • convertToSWT

      public static List<org.eclipse.swt.graphics.ImageData> convertToSWT(Image input)
      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 convert
      tint - the Color to apply to the generated image
      alphaTint - the alpha coefficient
      Returns:
      the ImageData object(s) created in the conversion