Class GraphicsUtil
java.lang.Object
org.eclipse.nebula.visualization.widgets.util.GraphicsUtil
public class GraphicsUtil
extends java.lang.Object
The utility class contains functions that all related with graphics.
-
Constructor Summary
Constructors Constructor Description GraphicsUtil()
-
Method Summary
Modifier and Type Method Description static org.eclipse.swt.graphics.Pattern
createScaledPattern(org.eclipse.draw2d.Graphics graphics, org.eclipse.swt.graphics.Device device, float x1, float y1, float x2, float y2, org.eclipse.swt.graphics.Color color1, int alpha1, org.eclipse.swt.graphics.Color color2, int alpha2)
static org.eclipse.swt.graphics.Pattern
createScaledPattern(org.eclipse.draw2d.Graphics graphics, org.eclipse.swt.graphics.Device device, float x1, float y1, float x2, float y2, org.eclipse.swt.graphics.Color color1, org.eclipse.swt.graphics.Color color2)
static org.eclipse.swt.graphics.RGB
mixColors(org.eclipse.swt.graphics.RGB c1, org.eclipse.swt.graphics.RGB c2, double weight)
Mixes the passed Colors and returns the resulting Color.static boolean
testPatternSupported(org.eclipse.draw2d.Graphics graphics)
-
Constructor Details
-
GraphicsUtil
public GraphicsUtil()
-
-
Method Details
-
testPatternSupported
public static boolean testPatternSupported(org.eclipse.draw2d.Graphics graphics) -
mixColors
public static org.eclipse.swt.graphics.RGB mixColors(org.eclipse.swt.graphics.RGB c1, org.eclipse.swt.graphics.RGB c2, double weight)Mixes the passed Colors and returns the resulting Color.- Parameters:
c1
- the first colorc2
- the second colorweight
- the first color's weight from 0-1- Returns:
- the new color
- Since:
- 2.0
-
createScaledPattern
public static org.eclipse.swt.graphics.Pattern createScaledPattern(org.eclipse.draw2d.Graphics graphics, org.eclipse.swt.graphics.Device device, float x1, float y1, float x2, float y2, org.eclipse.swt.graphics.Color color1, int alpha1, org.eclipse.swt.graphics.Color color2, int alpha2) -
createScaledPattern
public static org.eclipse.swt.graphics.Pattern createScaledPattern(org.eclipse.draw2d.Graphics graphics, org.eclipse.swt.graphics.Device device, float x1, float y1, float x2, float y2, org.eclipse.swt.graphics.Color color1, org.eclipse.swt.graphics.Color color2)
-