public class GraphicsUtils extends Object
Constructor and Description |
---|
GraphicsUtils() |
Modifier and Type | Method and Description |
---|---|
static org.eclipse.swt.graphics.Image |
createRotatedImage(org.eclipse.swt.graphics.Image image,
int style)
Creates a rotated image (plus or minus 90 degrees)
Styles:
UP, DOWN
|
static org.eclipse.swt.graphics.Image |
createRotatedText(String text,
org.eclipse.swt.graphics.Font font,
org.eclipse.swt.graphics.Color foreground,
org.eclipse.swt.graphics.Color background,
int style)
Creates an image containing the specified text, rotated either plus or minus
90 degrees.
|
static void |
drawVerticalImage(org.eclipse.swt.graphics.Image image,
int x,
int y,
boolean paintBackground,
org.eclipse.swt.graphics.GC gc,
int style)
Draws an image vertically (rotates plus or minus 90 degrees)
Styles:
UP, DOWN
|
static void |
drawVerticalImage(org.eclipse.swt.graphics.Image image,
int x,
int y,
org.eclipse.swt.graphics.GC gc,
int style)
Draws an image vertically (rotates plus or minus 90 degrees)
Styles:
UP, DOWN
|
static void |
drawVerticalText(String string,
int x,
int y,
boolean underline,
boolean strikethrough,
boolean paintBackground,
org.eclipse.swt.graphics.GC gc,
int style)
Draws text vertically (rotates plus or minus 90 degrees).
|
static void |
drawVerticalText(String string,
int x,
int y,
org.eclipse.swt.graphics.GC gc,
int style)
Draws text vertically (rotates plus or minus 90 degrees).
|
public static void drawVerticalText(String string, int x, int y, org.eclipse.swt.graphics.GC gc, int style)
string
- the text to drawx
- the x coordinate of the top left corner of the drawing rectangley
- the y coordinate of the top left corner of the drawing rectanglegc
- the GC on which to draw the textstyle
- the style (SWT.UP or SWT.DOWN)
Note: Only one of the style UP or DOWN may be specified.
public static void drawVerticalText(String string, int x, int y, boolean underline, boolean strikethrough, boolean paintBackground, org.eclipse.swt.graphics.GC gc, int style)
string
- the text to drawx
- the x coordinate of the top left corner of the drawing rectangley
- the y coordinate of the top left corner of the drawing rectangleunderline
- set to true
to render the text underlinedstrikethrough
- set to true
to render the text strikethroughpaintBackground
- set to false
to render the background transparent.
Needed for example to render the background with an image or gradient with another painter
so the text drawn here should have no background.gc
- the GC on which to draw the textstyle
- the style (SWT.UP or SWT.DOWN)
Note: Only one of the style UP or DOWN may be specified.
public static void drawVerticalImage(org.eclipse.swt.graphics.Image image, int x, int y, org.eclipse.swt.graphics.GC gc, int style)
image
- the image to drawx
- the x coordinate of the top left corner of the drawing rectangley
- the y coordinate of the top left corner of the drawing rectanglegc
- the GC on which to draw the imagestyle
- the style (SWT.UP or SWT.DOWN)
Note: Only one of the style UP or DOWN may be specified.
public static void drawVerticalImage(org.eclipse.swt.graphics.Image image, int x, int y, boolean paintBackground, org.eclipse.swt.graphics.GC gc, int style)
image
- the image to drawx
- the x coordinate of the top left corner of the drawing rectangley
- the y coordinate of the top left corner of the drawing rectanglepaintBackground
- set to false
to render the background transparent.
Needed for example to render the background with an image or gradient with another painter
so the text drawn here should have no background.gc
- the GC on which to draw the imagestyle
- the style (SWT.UP or SWT.DOWN)
Note: Only one of the style UP or DOWN may be specified.
public static org.eclipse.swt.graphics.Image createRotatedText(String text, org.eclipse.swt.graphics.Font font, org.eclipse.swt.graphics.Color foreground, org.eclipse.swt.graphics.Color background, int style)
text
- the text to rotatefont
- the font to useforeground
- the color for the textbackground
- the background colorstyle
- direction to rotate (up or down)Note: Only one of the style UP or DOWN may be specified.
public static org.eclipse.swt.graphics.Image createRotatedImage(org.eclipse.swt.graphics.Image image, int style)
image
- the image to rotatestyle
- direction to rotate (up or down)Note: Only one of the style UP or DOWN may be specified.
Copyright © 2013. All Rights Reserved.