• 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
Converting an NSString to a series of NSImages?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Converting an NSString to a series of NSImages?


  • Subject: Converting an NSString to a series of NSImages?
  • From: Albert Atkinson <email@hidden>
  • Date: Wed, 18 Sep 2002 13:06:07 -0500

Hello!

I am afraid I am stumped on this one, I can not find any documentation on how to do this. I have an image file that contains a bunch of letters, arranged like a sprite in rows of 10, each section is 32x32 pixels. What I would like to do is this, reference an NSString and then print the appropriate letters into an NSImageView, basically something like:

[myMethod makeImage: @"Hello!"];

Would select the appropriate letters from my NSImage and print them into my NSImageView.

I have seen this done before (for example in the game TuxRacer, probably not a Cocoa app but maybe some similar methods) Can anyone help or provide sample code or something?

If you would like a sample image of how my letters are set up in my image let me know and I will email it to you, unfortunately the list does not like attachments.

Thanks!
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Converting an NSString to a series of NSImages?
      • From: Marco Binder <email@hidden>
    • Re: Converting an NSString to a series of NSImages?
      • From: Marco Binder <email@hidden>
  • Prev by Date: 2 different questions
  • Next by Date: Re: Check if URL Handler is available for URL
  • Previous by thread: Re: 2 different questions
  • Next by thread: Re: Converting an NSString to a series of NSImages?
  • Index(es):
    • Date
    • Thread