yes it does steve thank you very much...still so much to learn!

rick





________________________________
From: Steve Christensen <puns...@mac.com>
To: Rick C. <jo_p...@yahoo.com>
Cc: cocoa dev <cocoa-dev@lists.apple.com>
Sent: Thursday, September 3, 2009 12:37:19 AM
Subject: Re: drawing my image in snow leopard

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 <msappleli...@toolsfactory.com>
> To: cocoa dev <cocoa-dev@lists.apple.com>
> 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 (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