[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NSColor question
From: |
Alexander Malmberg |
Subject: |
Re: NSColor question |
Date: |
Tue, 24 Feb 2004 03:11:44 +0100 |
Fred Kiefer wrote:
> What is interesting is, that both backends result in
> different colours being displayed instead. I have no idea, which is
> correcter.
This is because NSWindow draws a rectangle using the clear color instead
of copy-compositing it to the window. Thus, the backend is
sover-compositing the clear color on top of a window where nothing has
been drawn yet, and the contents of a window where nothing has been
drawn yet depends on the backend (-art starts with zeroed buffers, ie.
black). I wouldn't call any of them more correct; I consider the
contents undefined until you draw something.
In theory, this is easily fixed by using a DPScompositerect with
NSCompositeCopy instead of an NSRectFill to draw the background, but I'm
not sure -xlib implements DPScompositerect well enough to handle this.
Either way, I have too many local (and related) changes in NSWindow do
anything right now, but I can look at it when the other parts are done.
- Alexander Malmberg