Package org.eclipse.draw2d
Class ImageUtilities
java.lang.Object
org.eclipse.draw2d.ImageUtilities
- Since:
- 3.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 givenImage
shaded with the givenColor
.
-
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 renderedfont
- the fontforeground
- the text's colorbackground
- the background color- Returns:
- an Image which must be disposed
-
createRotatedImage
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
Creates an ImageData representing the givenImage
shaded with the givenColor
.- Parameters:
fromImage
- Image that has to be shadedshade
- The Color to be used for shading- Returns:
- A new ImageData that can be used to create an Image.
-