Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » XOR-Bug (and Mac and solution)
XOR-Bug (and Mac and solution) [message #202421] Wed, 09 November 2005 16:10
Jens von Pilgrim is currently offline Jens von PilgrimFriend
Messages: 313
Registered: July 2009
Senior Member
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
Previous Topic:Need an advice
Next Topic:selection and creation commands
Goto Forum:
  


Current Time: Wed Nov 06 14:56:36 GMT 2024

Powered by FUDForum. Page generated in 0.06381 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top