Bug 4734 - drawText() does not respect setXORMode(true) (1GFQI15)
Summary: drawText() does not respect setXORMode(true) (1GFQI15)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Silenio Quarti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-11 14:22 EDT by Mike Wilson CLA
Modified: 2003-05-15 22:24 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Wilson CLA 2001-10-11 14:22:06 EDT
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.
Comment 1 DJ Houghton CLA 2001-10-29 16:34:41 EST
PRODUCT VERSION:
	Build 125

Comment 2 Mike Wilson CLA 2001-12-10 11:39:53 EST
We would like this to work. SSQ to investigate.
Comment 3 Silenio Quarti CLA 2003-05-15 22:24:17 EDT
Fixed > 20030515 (HEAD).