Re: New NSImage from multiple NSImages
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.