Project: SWT
Bug 152936 Regression: GC.drawRectangle fills background in some cases
Reported: 2006-08-07 02:32:15 | Status: resolved fixed

SWT-win32, v3305 GC.drawRectangle fills the background when it shouldn't. See test case and screenshot. --- import org.eclipse.swt.*; import org.eclipse.swt.widgets.*; public class DrawingTest1 { public static void main(String[] args) { final Display display = new Display(); Shell shell = new Shell(display); shell.addListener(SWT.Paint, new Listener() { public void handleEvent(Event e) { e.gc.setBackground(display.getSystemColor(SWT.COLOR_RED)); e.gc.setForeground(display.getSystemColor(SWT.COLOR_BLACK)); e.gc.drawRectangle(10, 10, 50, 50); e.gc.fillRectangle(1, 1, 0, 0); e.gc.drawRectangle(70, 10, 50, 50); } }); shell.setSize(200, 200); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } }

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