• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Creating and Displaying Bitmap in CGContextRef
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating and Displaying Bitmap in CGContextRef


  • Subject: Re: Creating and Displaying Bitmap in CGContextRef
  • From: David Duncan <email@hidden>
  • Date: Wed, 20 Feb 2008 11:42:43 -0800

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
email@hidden



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Creating and Displaying Bitmap in CGContextRef
      • From: Mario Gajardo Tassara <email@hidden>
References: 
 >Creating and Displaying Bitmap in CGContextRef (From: Mario Gajardo Tassara <email@hidden>)

  • Prev by Date: Creating and Displaying Bitmap in CGContextRef
  • Next by Date: Re: using C++ class in the Obj-C file (FAILED...)
  • Previous by thread: Creating and Displaying Bitmap in CGContextRef
  • Next by thread: Re: Creating and Displaying Bitmap in CGContextRef
  • Index(es):
    • Date
    • Thread