Project: SWT
Bug 251012 GC drawText draws back ground incorrectly
Reported: 2008-10-15 16:52:21 | Status: resolved fixed

run this: shell.addListener(SWT.Paint, new Listener() { public void handleEvent(Event event) { event.gc.setBackground(display.getSystemColor(SWT.COLOR_YELLOW)); event.gc.drawText("Hello\nWorld", 10, 50, 0|SWT.DRAW_DELIMITER); } }); notice that the background extends the full width of the shell for the first line of text instead of just being the background of the text itself.

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java