Re: Can NSImageView not antialias a bitmap image?
Re: Can NSImageView not antialias a bitmap image?
- Subject: Re: Can NSImageView not antialias a bitmap image?
- From: Nicko van Someren <email@hidden>
- Date: Mon, 4 Oct 2004 17:49:15 +0100
On 4 Oct 2004, at 17:40, Nicko van Someren wrote:
On 4 Oct 2004, at 17:16, Glen Simmons wrote:
I'm creating an NSImage from some 1 bit bitmap data using
-[NSBitmapImageRep initWithBitmapDataPlanes:pixelsWide: ...] method.
I then call setScalesWhenResized:YES b/c the NSImageView it's going
to is larger than the original. I then set it in my NSImageView with
setImage:. Nothing special. The problem is that the image looks fuzzy
b/c the NSImageView is antialiasing it for me. How nice, except
that's not what I want. And there's not a way to tell NSImageView not
to antialias as far as I can see. What am I missing?
I'm not sure that there is a particular way to switch this off in
NSImageView but subclassing the image view with the following drawing
method works:
- (void)drawRect:(NSRect)rect { ... }
In fact, come to think of it, subclassing the setUpGState is less
typing and more efficient:
- (void)setUpGState {
[super setUpGState];
[[NSGraphicsContext currentContext] setImageInterpolation:
NSImageInterpolationNone];
}
Nicko
_______________________________________________
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