Community
Participate
Working Groups
setXORMode(true) has no effect on subsequent drawText() calls on both Windows and Motif. Either this should be documented, or fixed. NOTES: Code follows: import org.eclipse.swt.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; public class PR_1GFQI15 { public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new FillLayout()); Canvas canvas = new Canvas(shell, SWT.NONE); shell.setSize(300, 200); shell.open(); GC gc = new GC(canvas); FontData fontData = display.getSystemFont().getFontData()[0]; fontData.setHeight(72); gc.setFont(new Font(display, fontData)); // leak! gc.setForeground(new Color(display, 255, 255, 255)); // leak! gc.setXORMode(true); gc.drawText("Test", 0, 0); gc.drawText("Test", 0, 0); // nothing should appear onscreen anymore while (! shell.isDisposed()) { if (display.readAndDispatch()) display.sleep(); } } } McQ (26/06/2001 9:08:06 AM) - Need to decide whether we want to do this or not. If not, we should definately doc it.
PRODUCT VERSION: Build 125
We would like this to work. SSQ to investigate.
Fixed > 20030515 (HEAD).