Class GraphicsUtil
java.lang.Object
org.eclipse.nebula.visualization.xygraph.util.GraphicsUtil
public final class GraphicsUtil
extends java.lang.Object
Utility function for graphics operations.
-
Constructor Summary
Constructors Constructor Description GraphicsUtil() -
Method Summary
Modifier and Type Method Description static org.eclipse.swt.graphics.CursorcreateCursor(org.eclipse.swt.graphics.Device device, org.eclipse.swt.graphics.ImageData imageData, int width, int height)static org.eclipse.swt.graphics.GCcreateGC(org.eclipse.swt.graphics.Drawable image)Used for single sourcing, returns null if called in RAP Context.static voiddrawVerticalText(org.eclipse.draw2d.Graphics graphics, java.lang.String text, int x, int y, boolean upToDown)Draw vertical text.static voiddrawVerticalText(org.eclipse.draw2d.Graphics graphics, java.lang.String text, org.eclipse.draw2d.geometry.Point location, boolean upToDown)Draw vertical text.static booleanisRAP()static voidsetTransform(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Transform transform)
-
Constructor Details
-
GraphicsUtil
public GraphicsUtil()
-
-
Method Details
-
drawVerticalText
public static final void drawVerticalText(org.eclipse.draw2d.Graphics graphics, java.lang.String text, int x, int y, boolean upToDown)Draw vertical text.- Parameters:
graphics- draw2D graphics.text- text to be drawn.x- the x coordinate of the text, which is the left upper corner.y- the y coordinate of the text, which is the left upper corner.
-
drawVerticalText
public static final void drawVerticalText(org.eclipse.draw2d.Graphics graphics, java.lang.String text, org.eclipse.draw2d.geometry.Point location, boolean upToDown)Draw vertical text.- Parameters:
graphics- draw2D graphics.text- text to be drawn.location- the left upper corner coordinates of the text.
-
isRAP
public static final boolean isRAP() -
createGC
public static org.eclipse.swt.graphics.GC createGC(org.eclipse.swt.graphics.Drawable image)Used for single sourcing, returns null if called in RAP Context.- Parameters:
image-- Returns:
-
setTransform
public static void setTransform(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Transform transform) -
createCursor
public static org.eclipse.swt.graphics.Cursor createCursor(org.eclipse.swt.graphics.Device device, org.eclipse.swt.graphics.ImageData imageData, int width, int height)
-