XOR-Bug (and Mac and solution) [message #202421] |
Wed, 09 November 2005 16:10 |
|
Hi all,
I always disliked the way figures are displayed on Mac OS X when moving
them. Since XOR isn't working on Mac OS X (and, according to bug #50228
never will work) I tried to find a solution.
As a quickhack -- just for testing -- I modified
org.eclipse.draw2d.SWTGraphics.setXORMode(boolean):
public void setXORMode(boolean xor) {
setAlpha( (xor) ? 150 : 255); // quickhack
if (xor) setBackgroundColor(ColorConstants.blue); // nice addition to
quickhack
...
}
The result is very beautiful: Figures are transparent and a little bit
blue when moving them around, very nice.
Of course, SWTGraphics isn't the best class to add this modification,
maybe you can tell me were to add it.
Since Draw2D relies on SWT and it's XOR-functionality, I would say that
using XOR is a bug today, since SWT's XOR-methods are deprecated. Thus,
all XOR-methods in GEF should be annotated as deprecated, too. Maybe
one of the Draw2D authors can add the solution shown above at the
appropriate position (i.e. class and method) to the latest GEF version
and make Mac users happy ;)
Jens
|
|
|
Powered by
FUDForum. Page generated in 0.06381 seconds