Draw a non-antialiased image (NSImage)
Draw a non-antialiased image (NSImage)
- Subject: Draw a non-antialiased image (NSImage)
- From: Nick <email@hidden>
- Date: Wed, 26 Oct 2011 11:17:24 +0300
hi
I have a 2x2 px png image which represents a line element. I am drawing this
"line" by drawing vertically repeatedly these line elements. The problem is,
when I resize the window, I get this line's width "doubled" (probably,
because of antialiasing) and the line appears blurred. Is there a way I
could disable this "antialiasing" (or whatever it is?).
Thank you
int borderSize = 2;
[line drawAtPoint:NSMakePoint([self bounds].size.width-borderSize,
totalHeight-(borderSize/2 + borderSize+i*borderSize)) fromRect:NSMakeRect(0,
0, borderSize, borderSize) operation:NSCompositeSourceAtop fraction:1.0];
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden