diff options
author | Silenio Quarti | 2006-06-13 14:36:34 +0000 |
---|---|---|
committer | Silenio Quarti | 2006-06-13 14:36:34 +0000 |
commit | 82d9762c932708c073b22d5340f37497e7b81612 (patch) | |
tree | ce8d71f00fc8aaca429d0f4360b94bcd2abc8e37 /bundles/org.eclipse.swt/Eclipse SWT/cairo/org | |
parent | c5319bf89ea1686278d68af93aa053fe8bac4ea5 (diff) | |
download | eclipse.platform.swt-82d9762c932708c073b22d5340f37497e7b81612.tar.gz eclipse.platform.swt-82d9762c932708c073b22d5340f37497e7b81612.tar.xz eclipse.platform.swt-82d9762c932708c073b22d5340f37497e7b81612.zip |
fixing compile problems on Motifv3301a
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/cairo/org')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java b/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java index c4908caae4..735dd5eebe 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java @@ -13,7 +13,6 @@ package org.eclipse.swt.graphics; import org.eclipse.swt.*; import org.eclipse.swt.internal.*; import org.eclipse.swt.internal.cairo.*; -import org.eclipse.swt.internal.gtk.*; /** * Instances of this class represent paths through the two-dimensional @@ -186,23 +185,7 @@ public void addString(String string, float x, float y, Font font) { if (font == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (font.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); move = false; - byte[] buffer = Converter.wcsToMbcs(null, string, true); - if (OS.GTK_VERSION >= OS.VERSION(2, 8, 0)) { - int /*long*/ layout = OS.pango_cairo_create_layout(handle); - if (layout == 0) SWT.error(SWT.ERROR_NO_HANDLES); - OS.pango_layout_set_text(layout, buffer, -1); - OS.pango_layout_set_font_description(layout, font.handle); - Cairo.cairo_move_to(handle, x, y); - OS.pango_cairo_layout_path(handle, layout); - OS.g_object_unref(layout); - } else { - GC.setCairoFont(handle, font); - cairo_font_extents_t extents = new cairo_font_extents_t(); - Cairo.cairo_font_extents(handle, extents); - double baseline = y + extents.ascent; - Cairo.cairo_move_to(handle, x, baseline); - Cairo.cairo_text_path(handle, buffer); - } + GC.addCairoString(handle, string, x, y, font); } /** |