Re: Problems with NSAffineTransform
Re: Problems with NSAffineTransform
- Subject: Re: Problems with NSAffineTransform
- From: Laurent Daudelin <email@hidden>
- Date: Tue, 25 Jul 2006 22:49:03 -0400
- Thread-topic: Problems with NSAffineTransform
On Tue, 25 Jul 2006 08:46:10 -0700, Henry McGilton wrote:
> On Jul 24, 2006, at 10:59 PM, Laurent Daudelin wrote:
>
>> Hello.
>>
>> I just recently started playing with Quartz, CI and the likes, so be gentle!
>>
>> I'm setting up a slide show in a window using a subclass of NSImageView,
>> based partly on code from the documentation and partly from code from the
>> FunHouse project.
>>
>> I use an instance of NSAffineTransform with a CoreImage 'CIAffineTransform'
>> filter to scale the image to the size of the window and to center it in the
>> window.
>>
>> The scaling part works well but the translations don't for some reason. I
>> did test my code with a bunch of various pictures of different types. When
>> I'm not trying to translate the x and y coordinates, everything is fine. As
>> soon as I start using translateXBy:yBy:, then some pictures appear 10 times
>> as large as they appear when no translation is performed and all pictures
>> will generally be off, relative to the center, by a various amount of
>> pixels. If I use a set of pictures of the same time and the same size, they
>> will all appear at the same x,y coordinate, but they won't be centered
>> either.
>
>
> Try doing the translate *before* you do the scale
Henry,
Thanks a million! That was it! All pictures are centered properly now. Even
the page curl transition I've tried using when transitioning and was
generating an exception now works perfectly!
Thanks again!
-Laurent.
--
============================================================================
Laurent Daudelin AIM/iChat: LaurentDaudelin <http://nemesys.dyndns.org>
Logiciels Nemesys Software mailto:email@hidden
Sometimes the majority only means that all the fools are on the same side.
_______________________________________________
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