image upside down

Anthony B Arthur brianarthur at nc.rr.com
Sun Jul 27 21:28:12 PDT 2008


Using the CGContextDrawImage API, does anyone know why my image  
displays upside down?  This is puzzling.  The content from the file  
displays correctly, but when I create the image object and display it  
within my drawRect:, it comes out upside down.  My logic gets the  
current context, saves the graphics state, draws the image, then  
restores the graphics state, so I think all that is right, but can't  
figure out why the image draws upside down??

The same logic works correctly in other views of my app, but for some  
reason in this view it does not.  Could it have something to do with  
the way the subviews are ordered inside the superview?  I wouldn't  
think drawing with CG is affected by that.

Anyone?

-b



More information about the MacOSX-dev mailing list