Re: Anti-aliasing NSImage *without* drawInRect...
Re: Anti-aliasing NSImage *without* drawInRect...
- Subject: Re: Anti-aliasing NSImage *without* drawInRect...
- From: Nathan Day <email@hidden>
- Date: Sun, 2 Feb 2003 23:55:39 +1030
create a new image the size you want the final image to be, set the
source image to the size you want it also, called the new images
lockFocus method and then draw you source image in that.
On Sunday, February 2, 2003, at 10:57 PM, Ramon G. Ricca wrote:
Hello,
I've been lurking on this list for a while, and found that most of my
questions have been answered by previous posts. But...
I am writing a board game that has drag and drop pieces. The pieces
are much larger than the squares, so when I use NSImage.drawInRect
with a NSGraphicsContext setImageInterpolation to "high" I get a
nicely drawn image that is anti-aliased. However, I need an NSImage to
pass to dragImage of the pieces. I can get a copy of the piece with no
problem, but it isn't anti-aliased when I call setSize to a copy. I've
tried drawing to a rect outside my view and then using
dataWithPDFInsideRect from my view, but if it is out of bounds, I
can't seem to get any data to pass to a new NSImage. To rephrase my
question more simply, I would like to take an existing NSImage, size
it smaller without drawing it to the screen. I hope this hasn't been
beat to death, I looked on cocoa.mamasam and didn't find anything.
Thanks for any insights,
Ramon
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
Nathan Day
http://homepage.mac.com/nathan_day/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.