Re: affine transformation of bitmap images
Re: affine transformation of bitmap images
- Subject: Re: affine transformation of bitmap images
- From: Ricky Sharp <email@hidden>
- Date: Wed, 16 Feb 2005 16:51:04 -0600
On Feb 16, 2005, at 3:38 PM, Sean McBride wrote:
On 2005-02-16 15:28, Ricky Sharp said:
Just create an NSImage, lock focus on it, and draw. The transforms
will be applied to the current context which will be the NSImage. At
the end, unlock focus and then extract its representation.
Thanks Ricky,
That sounds pretty straightforward, I'll try it...
A related question: how does one create an NSImage from an
NSBitmapImageRep? Would I use [NSImage initWithSize:] then
addRepresentation:? The initWithSize docs say it wants the size as
'points', what's that?
Yes, use initWithSize: followed by addRepresentation.
In terms of points, I'll leave that as an exercise for you to read up
on. But as a start, Quartz allows for resolution independence and a
single point may not necessarily be represented by a single pixel
(could be more, or less pixels).
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden