 |
 |
Ghosts for transparent NSView's
|
 |
|
 |
|
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status:
Offline
|
|
This is a problem that's been bugging me for a while. I have a borderless window with a cear background and transparent content view. Whenever I change what ever is drawn in my content view, "ghosts" of old drawings is left behind. Does anyone know why this is happening and how to fix it? It goes away when I drag my window, so I though flushing it would fic the problem, but no dice so far.
Thanks in advance,
F-bacher
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status:
Offline
|
|
Does this mean nobody knows, nobody cares, or nobody likes me?
F-bacher
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
What backing store type are you using? If you're not, try using NSBackingStoreBuffered
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
Odd... Looks like a bug to me. File a radar on it 
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Dec 2000
Location: Boston, MA USA
Status:
Offline
|
|
Haven't taken a look at the symptoms but it sounds like you haven't told Quartz the window is translucent. Try adding this line of code sometime after you open the window:
[window setOpaque:NO];
Like I said I haven't seen your code, so if you did this just disregard this post!
- Ross
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Dec 2000
Location: Boston, MA USA
Status:
Offline
|
|
Sorry that was the wrong fix. Just got the code, and this is what you want to do:
Add the following code at the end of drawRect of the view subclass:
[[self window] setHasShadow:NO];
[[self window] setHasShadow:YES];
This is a documented bug. It's not really a bug, you just have to tell Quartz to redraw the window's shadow.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status:
Offline
|
|
THANK YOU THANK YOU THANK YOU!
I thought it might have something to do with the shadow, but I didn't think to toggle it.
Thanks a ton!
F-bacher
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|