Info for working with image files?

Posts: 22
Joined: 2007.05
Post: #1
Can anyone point me to some good (beginner) information on working with image files in xcode? I have a PNG file that contains the face images for a deck of cards. For this learning project I am trying to figure out how to draw the individual cards to arbitrary locations in my application. My immediate questions:

1.) Do I use NSImageView to display the cards?
2.) Do I need an individual NSImageView for each card that I want to display?
3.) Since I am writing a class for the card will it be advisable to include the card locations in the png as properties of the card instances?

If someone could outline the steps involved I can do the research myself (this is how I learn best). I am looking for pointers on where to begin. Thanks again.
Quote this message in a reply
Posts: 283
Joined: 2006.05
Post: #2
You could use NSImageView to draw the cards at fixed locations, in which case you would need one for each card, but it would probably make more sense to use an NSCustomView and use NSImage's drawInRect or one of the other draw methods.

That said, you might want to play with NSImageView first because it's nice and easy.

Edit: Here's an Intro to Quartz that has some relevant examples.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  In-Game Memory Usage Info Griggs 1 4,088 Sep 5, 2002 09:12 PM
Last Post: zzajin
  System Info deekpyro 18 11,866 May 25, 2002 02:50 PM
Last Post: Chris Burkhardt