summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics
diff options
context:
space:
mode:
authorSilenio Quarti <silenio>2005-04-28 14:33:01 +0000
committerSilenio Quarti <silenio>2005-04-28 14:33:01 +0000
commit860a8187b518ea55f8d82658eade9d2c12edbcf0 (patch)
tree32695be7c375ee04b13db42c7d6f972cea2ebeb6 /bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics
parentcbce7024c0928a31c94d3242b07da22ac6c1019b (diff)
downloadeclipse.platform.swt-860a8187b518ea55f8d82658eade9d2c12edbcf0.tar.gz
eclipse.platform.swt-860a8187b518ea55f8d82658eade9d2c12edbcf0.tar.xz
eclipse.platform.swt-860a8187b518ea55f8d82658eade9d2c12edbcf0.zip
*** empty log message ***
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java27
1 files changed, 25 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java
index 3a36e0cf57..32e98489e1 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java
@@ -1001,6 +1001,7 @@ public void drawOval (int x, int y, int width, int height) {
*/
public void drawPath(Path path) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
+ if (path == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (path.handle == 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
@@ -1681,6 +1682,7 @@ public void fillOval (int x, int y, int width, int height) {
*/
public void fillPath (Path path) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
+ if (path == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (path.handle == 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
@@ -1869,6 +1871,11 @@ public Color getBackground() {
return Color.photon_new(data.device, data.background);
}
+public Pattern getBackgroundPattern() {
+ if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
+ return null;
+}
+
/**
* Returns the width of the specified character in the font
* selected into the receiver.
@@ -2048,6 +2055,11 @@ public Color getForeground() {
return Color.photon_new(data.device, data.foreground);
}
+public Pattern getForegroundPattern() {
+ if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
+ return null;
+}
+
/**
* WARNING API STILL UNDER CONSTRUCTION AND SUBJECT TO CHANGE
*/
@@ -2337,6 +2349,12 @@ public void setBackground (Color color) {
dirtyBits |= DIRTY_BACKGROUND;
}
+public void setBackgroundPattern (Pattern pattern) {
+ if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
+ if (pattern == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ if (pattern.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+}
+
/**
* Sets the area of the receiver which can be changed
* by drawing operations to the rectangular area specified
@@ -2518,6 +2536,12 @@ public void setInterpolation(int interpolation) {
}
}
+public void setForegroundPattern (Pattern pattern) {
+ if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
+ if (pattern == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ if (pattern.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+}
+
/**
* Sets the receiver's line cap style to the argument, which must be one
* of the constants <code>SWT.CAP_FLAT</code>, <code>SWT.CAP_ROUND</code>,
@@ -2845,8 +2869,7 @@ public void setTextAntialias(int antialias) {
*/
public void setTransform(Transform transform) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- if (transform == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
- if (transform.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ if (transform != null && transform.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
/**