Drawing into a NSQuickDrawView
Drawing into a NSQuickDrawView
- Subject: Drawing into a NSQuickDrawView
- From: "Rafael K. Kobylinski" <email@hidden>
- Date: Sat, 22 Sep 2001 12:01:27 +0200
I am drawing into a NSQuickDrawView by getting access to the graphics
port and drawing to that port outside the regular drawRect method,
because I need to draw continously (the source is a video feed from
QuickTime's sequence grabber). Is this generally a bad idea, and
should I change that?
If I use a buffered window, the results of my drawing appear
continously in the view. It appears that using the port I draw
directly to the screen, because I get flicker and I need to do my own
double buffering to get rid of it.
If I use a non-buffered window, I get no automatic redrawing at all.
The view only redraws its content if places something before it, thus
forcing a redraw. So obiously in this case I cannot draw to the
screen.
Does anyone has an idea what causes the redraw in the first case? Am
I really getting a port to the screen. Why not so in the second case?
Also, if I try to use QuickDraws CopyBits function to copy the pixel
map to the destination port, I always draw a bit off the window - if
I use QuickTime's decompress sequence things work fine (both set to
the same port as the destination).
Unfortunately, the description for the NSQuickDrawView class is
"forthcoming" :-(
--
Rafael K. Kobylinski Email: email@hidden
Institut f|r Informatik Tel. : ++ 49 89 289 22391
Technische Universitdt M|nchen Cell.: ++ 49 177 7 495020