On Tue, Apr 6, 2010 at 2:58 PM, Jens Alfke <j...@mooseyard.com> wrote:

>
> On Apr 6, 2010, at 1:17 PM, Chris Tracewell wrote:
>
>  I am trying to get NSImageView to alias dropped images, but it refuses.
>>
>
> Nitpick: you mean "antialias". Aliasing is what creates the jaggies,
> antialiasing smooths them away.
>
>
>  Just spent an hour looking and trying several variations to no avail.
>> Here's what I have done in a subclass of NSImageView.
>>
>
> I remember having to deal with this too, years ago. It's too bad AppKit
> hasn't added support for this yet :(
>
> The problem is that NSImageView internally keeps a scaled copy of the
> image. So the actual scaling that creates the aliasing isn't done in the
> drawRect: method at all.
>

This was once true, but is out of date.  I'd like to see a test app.  For
example, how do you know you aren't getting antialiasing?  It may be that
you just don't like the output. :-)

It would also be good to know what OS you are working on.

-Ken


> I can't remember now how I solved this. I may hve re-implemented -drawRect:
> completely, i.e. added the code to draw [self image] into [self bounds] and
> not called super. Another possibility is to override -setImage: and keep the
> original image yourself in a new ivar, scale it down smoothly, and call
> [super setImage:] with the smooth-scaled version.
>
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to