Re: drawing my image in snow leopard
Re: drawing my image in snow leopard
- Subject: Re: drawing my image in snow leopard
- From: Steve Christensen <email@hidden>
- Date: Wed, 02 Sep 2009 09:37:19 -0700
Does this not do what you want?
[myImage drawInRect:NSIntegralRect(myCenteredRect) fromRect:...];
steve
On Sep 2, 2009, at 9:22 AM, Rick C. wrote:
thank you markus i do see that now. since my icon centers the
numbers will always change. this should be obvious but what would
be the least memory intensive way to constantly round this number...
center.x = bounds.width *.5
if center.x is a round number it works as you say. i'm probably
missing the obvious as usual but i'm having a bit of trouble to
round/truncate the cgfloat...
thanks again,
rick
________________________________
From: Markus Spoettl <email@hidden>
To: cocoa dev <email@hidden>
Sent: Wednesday, September 2, 2009 8:17:56 PM
Subject: Re: drawing my image in snow leopard
On Sep 2, 2009, at 12:33 PM, Rick C. wrote:
i've been using NSImage drawInRect:fromRect:operation:fraction: to
draw and center my .icns image in a resizable custom view for some
time without issues. now in snow leopard the same code works,
however when the custom view is at its minimum size the image is
slightly blurry. when i resize the custom view to full size the
image is fine. seems to be maybe scaling but i'm not rescaling
the image the size is constant. of course the view is being
resized. i just checked again in leopard and this is not an
issue. i'm thinking i need to add something in my code to keep up
with changes in snow leopard but i haven't yet figured out what
that might be. if anyone needs some code i can post it. thank you,
The AppKit release notes state that with 10.6 the image destination
coordinates are no longer rounded to integral values. Just round x
and y of your destination rect and the image should appear sharp
like before.
_______________________________________________
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