[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in Alpha compositing
From: |
Georg Fleischmann |
Subject: |
Bug in Alpha compositing |
Date: |
Wed, 17 Jul 2002 18:58:42 GMT |
Hi,
I realized a new bug with alpha compositing. I found out that the problem
appeared with the changes in XGGState.m -setColor:state: and -setAlphaColor: in
May. If I use an earlier version of XGGState.m it works.
As I don't have an idea of the changes and not much time at the moment, I
thought I just post what I know.
Here is what I'm doing:
I use a window which I fill transparent, and then I draw opaque graphics
(Line, Arc...) to it, like this.
[betaView lockFocus];
[[NSColor colorWithDeviceWhite:1.0 alpha:0.0] set];
NSRectFill(rect_start);
[obj draw:self];
[betaView unlockFocus];
I then composite this window using NSCompositeSourceOver. All I get is a white
opaque rectangle.
PScomposite(NSMinX(rect_start), NSMinY(rect_start),
NSWidth(rect_start), NSHeight(rect_start),
[betaView gState], NSMinX(rect_now), NSMinY(rect_now),
NSCompositeSourceOver);
If I use a composite with NSCompositeCopy instead, the graphic is copied (but
on a white opaque background):
NSCopyBits([betaView gState], rect_start, rect_now.origin);
Georg
- Bug in Alpha compositing,
Georg Fleischmann <=