• 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: New NSImage from multiple NSImages
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New NSImage from multiple NSImages


  • Subject: Re: New NSImage from multiple NSImages
  • From: Scott Anguish <email@hidden>
  • Date: Tue, 9 Jul 2002 18:06:00 -0400

you'd need to create a new NSImage of the size of the complete card, lockFocus on it, and then draw the image

to draw, you have several options

- drawAtPoint:fromRect:operation:fraction:
- drawInRect:fromRect:operation:fraction:
- drawRepresentation:inRect:

in NSImage
and

- drawAtPoint:
- drawInRect:

in NSImageRep (which you can get the imageRep from the NSImage using

- bestRepresentationForDevice:
- representations



On Tuesday, July 9, 2002, at 05:49 PM, Justin Lundy wrote:

I'm trying to create a playing card dynamically using several images, say a blank card (for size) and images of a heart and an A. If cardImage has the x/y size of 108,144 and heartImage has the x/y size of 20,20, how do I create a new NSImage, heartCard, from cardImage with heartImage drawn on it at 44, 62?

- Justin
_______________________________________________
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.
_______________________________________________
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.

References: 
 >New NSImage from multiple NSImages (From: Justin Lundy <email@hidden>)

  • Prev by Date: New NSImage from multiple NSImages
  • Next by Date: Re: New NSImage from multiple NSImages
  • Previous by thread: New NSImage from multiple NSImages
  • Next by thread: Re: New NSImage from multiple NSImages
  • Index(es):
    • Date
    • Thread