Skip navigation.
 
mlRe: Creating and Displaying Bitmap in CGContextRef
FROM : David Duncan
DATE : Wed Feb 20 20:42:43 2008

On Feb 20, 2008, at 7:19 AM, Mario Gajardo Tassara wrote:

> Im in the process of learning Quartz 2D programming API, and im 
> trying to display a tiled image in a NSView, i wrote this code for 
> creating a valid bitmap context and a routine for displaying a tiled 
> image, but nothing is displayed, im not sure what`s wrong because my 
> printf debugging statements show good info about the creation of the 
> CGcontext and the loading of the image, any help will be 
> appreciated, thanks:



Your not drawing into the window at all. You need to get the CGContext 
to draw to from the current NSGraphicsContext via:

CGContextRef context = (CGContextRef)[[NSGraphicsContext 
currentContext] graphicsPort];

The bitmap context stuff you have looks like a red herring.
--
David Duncan
Apple DTS Animation and Printing
david.<email_removed>

Related mailsAuthorDate
mlCreating and Displaying Bitmap in CGContextRef Mario Gajardo Tass… Feb 20, 16:19
mlRe: Creating and Displaying Bitmap in CGContextRef David Duncan Feb 20, 20:42
mlRe: Creating and Displaying Bitmap in CGContextRef Mario Gajardo Tass… Feb 20, 23:38