Re: Combining two NSImages into one
Re: Combining two NSImages into one
- Subject: Re: Combining two NSImages into one
- From: Greg Casey <email@hidden>
- Date: Mon, 28 Oct 2002 21:37:48 -0500
I think this will work:
NSSize mySize;
mySize.width = [image1 size].width + [image2 size].width;
mySize.height = ([image1 size].height > [image2 size].height : [image1
size].height : [image2 size].height);
myImage = [[NSImage alloc] initWithSize: mySize];
[myImage lockFocus];
[image1 compositeAtPoint:NSMakePoint(0,0) operation: NSCompositeCopy];
[image2 compositeAtPoint:NSMakePoint([image1 size].width, 0)
operation: NSCompositeCopy];
[myImage unlockFocus];
-gtc
On Monday, October 28, 2002, at 05:51 PM, Ali Lalani (list) wrote:
If i have two NSImages of the same sizes, what would be the best way
to put them together, side by side, into one single NSImage?
_______________________________________________
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.