[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [gef-dev] Ghost shape, Mac OS X xor issue, and a possible solution
|
Hi,
Am 15.11.2005 um 17:25 schrieb Randy Hudson:
Besides requiring GDI+ library on windows 2000, and Cairo on Linux,
painting using alpha is probably 1-2 orders of magnitude slower
than XOR. Any change we make should probably be OS-specific.
Maybe I've got something wrong here. But: (SWT) XOR functionality
_is_ deprecated! It's deprecated since it is platform specific. It is
not (and will never be) working on Mac OS X. Mac OS X is listed as
one of the reference platforms in the Eclipse 3.1.1 release notes. Of
course, this seems to be a SWT problem in first place. Or a OS X
problem. I don't know. But anyway: SWT setAlpha is not deprecated.
Maybe my quick hack can be made OS-specific:
private static boolean bAlphaGhost = SWT.getPlatform().equals("carbon");
public static Shape makeGhostShape(Shape s) {
s.setBackgroundColor(ghostFillColor);
if (bAlphaGhost) {
s.setAlpha(100);
} else {
s.setFillXOR(true);
s.setOutlineXOR(true);
}
return s;
}
I don't like this sine I don't like these platform specific
statements in Java.
I'm a feeling little bit like a Don Quichotte fighting against
windmills. The performance of GEF under OS X is so bad, that I'm
wondering if anyone is actually using GEF/OS X. I've tested GEF on
several Macs, and even with a PowerMac 2 GHz Dual Core moving figures
around feels like working with a 100 MHz Pentium. So, probably nobody
will notice the bad ghost shape behaviour in OS X, since nobody is
really using this combination :( Since GEF is running perfectly well
under Windows, I assume SWT is the problem, but especially GEF is
suffering from the bad SWT-OSX performance. It's a pity, since Cocoa/
Quarz is so fast -- e.g. dragging an image from Safari is amazing
(the whole image, a little bit transparent, is moved) , too bad that
GEF can't compete against this.
Jens