Package org.eclipse.draw2d

# Class ImageUtilities

java.lang.Object
org.eclipse.draw2d.ImageUtilities

public class ImageUtilities extends Object

Since:
  3.0

## Constructor Summary

Constructors
Constructor
Description
`ImageUtilities()`

## Method Summary

Modifier and Type
Method
Description
`static Image`
`createRotatedImage(Image srcImage)`
Returns a new Image that is the given Image rotated left by 90 degrees.
`static Image`
`createRotatedImageOfString(String string, Font font, Color foreground, Color background)`
Returns a new Image with the given String rotated left (by 90 degrees).
`static ImageData`
`createShadedImage(Image fromImage, Color shade)`
Creates an ImageData representing the given `Image` shaded with the given `Color`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ImageUtilities

public ImageUtilities()

## Method Details

### createRotatedImageOfString

public static Image createRotatedImageOfString(String string, Font font, Color foreground, Color background)
Returns a new Image with the given String rotated left (by 90 degrees). The String will be rendered using the provided colors and fonts. The client is responsible for disposing the returned Image. Strings cannot contain newline or tab characters.

Parameters:
  `string` - the String to be rendered
  `font` - the font
  `foreground` - the text's color
  `background` - the background color
Returns:
  an Image which must be disposed

### createRotatedImage

public static Image createRotatedImage(Image srcImage)
Returns a new Image that is the given Image rotated left by 90 degrees. The client is responsible for disposing the returned Image.

Parameters:
  `srcImage` - the Image that is to be rotated left
Returns:
  the rotated Image (the client is responsible for disposing it)

### createShadedImage

public static ImageData createShadedImage(Image fromImage, Color shade)
Creates an ImageData representing the given `Image` shaded with the given `Color`.

Parameters:
  `fromImage` - Image that has to be shaded
  `shade` - The Color to be used for shading
Returns:
  A new ImageData that can be used to create an Image.