diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java index ea28083156..c7e10d416c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java @@ -1678,8 +1678,8 @@ public void drawText (String string, int x, int y, int flags) { NSPoint pt = new NSPoint(); pt.x = x; pt.y = y; + NSRange range = data.layoutManager.glyphRangeForTextContainer(data.textContainer); if ((flags & SWT.DRAW_TRANSPARENT) == 0) { - data.layoutManager.glyphRangeForTextContainer(data.textContainer); NSRect rect = data.layoutManager.usedRectForTextContainer(data.textContainer); rect.x = x; rect.y = y; @@ -1692,8 +1692,6 @@ public void drawText (String string, int x, int y, int flags) { bg.setFill(); NSBezierPath.fillRect(rect); } - NSRange range = new NSRange(); - range.length = data.layoutManager.numberOfGlyphs(); data.layoutManager.drawGlyphsForGlyphRange(range, pt); handle.restoreGraphicsState(); } finally { |