Skip navigation.
 
mlRe: CGContextDrawImage drawing only once
FROM : mdpb@gmx.net
DATE : Sun Jun 22 20:31:25 2008

You were right, missed the most basic command. Its working beautiful 
now. Working on using full screen mode right now.
setViewsNeedDisplay: YES];

Thanks!

Matt

On Jun 10, 2008, at 3:08 AM, Christiaan Hofman wrote:

>
> On 10 Jun 2008, at 4:12 AM, <email_removed> wrote:
>

>> 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

>
> What are you doing? It seems to me that you're drawing to the view's 
> context directly outside the drawRect: method, is that correct? In 
> that case, it's not a GC question but a Cocoa drawing question, and 
> you should read <http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaDrawingGuide/Introduction/chapter_1_section_1.html

> >.
>
> Christiaan

Related mailsAuthorDate
mlCGContextDrawImage drawing only once mdpb@gmx.net Jun 10, 04:12
mlRe: CGContextDrawImage drawing only once Michael Vannorsdel Jun 10, 10:59
mlRe: CGContextDrawImage drawing only once Christiaan Hofman Jun 10, 12:08
mlRe: CGContextDrawImage drawing only once mdpb@gmx.net Jun 22, 20:31