CGContextDrawImage drawing only once

mdpb at gmx.net mdpb at gmx.net
Mon Jun 9 19:12:36 PDT 2008


Hi

New to the list but I think this is a relative easy question for any  
coregraphics developer (which is I guess not me).

I am displaying a series of bitmaps in a window (every so many  
seconds), almost like an animation.

I am using CGContextDrawImage to draw the CGImage (created by  
CGBitmapContextCreateImage) to the context of my NSView.
I got the CGContextRef of my NSView from the drawRect of my NSView.

Here are the symptoms I run into:
-I can draw one image like this to my NSView
-I can draw another image but it won't get displayed/updated on my  
NSView
-if I put my terminal at this point on top of my NSView then the  
correct picture shows up (my terminal is set to transparent so I see  
the NSView getting updated)
-if I use a counter to display the pictures then I also get the  
correct picture displayed (there is no bug in reading the images, its  
the displaying part)

What am I doing wrong, is there some kind of flag not set? Thanks

Matt


More information about the MacOSX-dev mailing list