diff options
author | Silenio Quarti <silenio_quarti@ca.ibm.com> | 2012-01-19 11:56:57 -0500 |
---|---|---|
committer | Silenio Quarti <silenio_quarti@ca.ibm.com> | 2012-01-19 11:56:57 -0500 |
commit | 2409e4895346facaeea6eeef6414188a3d1e2f65 (patch) | |
tree | 5b7075965c47e44cef692f420c89841614ab6115 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java | |
parent | 81769f86af686a9108c70f5eccca90f204a41cef (diff) | |
download | eclipse.platform.swt-2409e4895346facaeea6eeef6414188a3d1e2f65.tar.gz eclipse.platform.swt-2409e4895346facaeea6eeef6414188a3d1e2f65.tar.xz eclipse.platform.swt-2409e4895346facaeea6eeef6414188a3d1e2f65.zip |
cleanup before merging into master
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java index b5d2458746..18a3741139 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java @@ -4031,9 +4031,13 @@ public void setTransform(Transform transform) { */ public void setXORMode(boolean xor) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); - if (OS.USE_CAIRO) { - Cairo.cairo_set_operator(handle, xor ? Cairo.CAIRO_OPERATOR_DIFFERENCE : Cairo.CAIRO_OPERATOR_OVER); - } else { + int /*long*/ cairo = data.cairo; + if (cairo != 0) { + if (Cairo.cairo_version() >= Cairo.CAIRO_VERSION_ENCODE(1, 10, 0)) { + Cairo.cairo_set_operator(handle, xor ? Cairo.CAIRO_OPERATOR_DIFFERENCE : Cairo.CAIRO_OPERATOR_OVER); + } + } + if (!OS.USE_CAIRO) { OS.gdk_gc_set_function(handle, xor ? OS.GDK_XOR : OS.GDK_COPY); } data.xorMode = xor; |