FillRectVsNSRectFill
last edited April 13, 2004 16:13:04 (80.199.113.18)
| |
|---|---|
| Edit / New / Search | Quick Links: Home / Recent Changes / Glossary / Jobs / Forums / Help |
|
CocoaDrawing
I'm trying to fill an NSView subclass (actually ScreenSaverView subclass) with [NSColor clearColor], but [NSBezierPath fillRect:] doesn't work the way I'd expect. First I run:
Then I try to fill the NSView with clear with:
but it doesn't work! But the following line does work:
What's going on here?
You have to refresh the NSView. Does that mean NSRectFill? draws directly onscreen? Will it be copied to the window's offscreen buffer? EnglaBenny does not overlay onto the background, it simply blasts the pixels in the specified rectangle to whatever NSColor has been set. However, you can use to (somewhat) mimick the NSBezierPath method.
Ok I ran a side-by-side test on
Now I think I get it...
Another difference seems to be that NSRectFill? uses pixel coordinates, whereas fillRect does not. I.e. if I fill a box e.g. | |
| Edit / New / Search | Quick Links: Home / Recent Changes / Glossary / Jobs / Forums / Help |