summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
diff options
context:
space:
mode:
authorBogdan Gheorghe <gheorghe@ca.ibm.com>2012-01-18 12:49:56 -0500
committerBogdan Gheorghe <gheorghe@ca.ibm.com>2012-01-18 12:49:56 -0500
commit775f7cfbc59632723c3d9a6faa1c78275b5107ae (patch)
tree60d6079ce46bb1cc18fee41c6f37614c5bc675fd /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
parent85eae7efec0f41bdf1f41e3f2bc6f9a1ce785823 (diff)
downloadeclipse.platform.swt-775f7cfbc59632723c3d9a6faa1c78275b5107ae.tar.gz
eclipse.platform.swt-775f7cfbc59632723c3d9a6faa1c78275b5107ae.tar.xz
eclipse.platform.swt-775f7cfbc59632723c3d9a6faa1c78275b5107ae.zip
Add a new property to enable Cairo graphics
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.java4
1 files changed, 3 insertions, 1 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 8c3baded82..79b122a50c 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
@@ -2904,6 +2904,8 @@ void init(Drawable drawable, GCData data, int /*long*/ gdkGC) {
int /*long*/ cairo = data.cairo = handle;
Cairo.cairo_set_fill_rule(cairo, Cairo.CAIRO_FILL_RULE_EVEN_ODD);
data.state &= ~(BACKGROUND | FOREGROUND | FONT | LINE_WIDTH | LINE_CAP | LINE_JOIN | LINE_STYLE | DRAW_OFFSET);
+ } else if (OS.INIT_CAIRO) {
+ initCairo();
}
setClipping(data.clipRgn);
if ((data.style & SWT.MIRRORED) != 0) {
@@ -3042,7 +3044,7 @@ boolean isIdentity(double[] matrix) {
*/
public void setAdvanced(boolean advanced) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- if ((data.style & SWT.MIRRORED) != 0 || OS.USE_CAIRO) {
+ if ((data.style & SWT.MIRRORED) != 0 || OS.USE_CAIRO || OS.INIT_CAIRO) {
if (!advanced) {
setAlpha(0xFF);
setAntialias(SWT.DEFAULT);