Re: NSProgressIndicator drawing
Re: NSProgressIndicator drawing
- Subject: Re: NSProgressIndicator drawing
- From: Scott Stevenson <email@hidden>
- Date: Thu, 23 Nov 2006 15:38:52 -0800
On Nov 23, 2006, at 12:19 PM, Adam Johnson wrote:
progressIndicator = [[NSProgressIndicator alloc]
initWithFrame:NSMakeRect([self bounds].size.width/4,[self
bounds].size.height/2-9,[self bounds].size.width/2,18)];
[self addSubview:progressIndicator];
In addition to what joar says about using NSIntegralRect, I've found
things sometimes draw more prettily when you use floats for
calculations instead of ints:
float width = [self bounds].size.width;
float height = [self bounds].size.height;
NSMakeRect ( width * 0.25, height * 0.50 - 9.0, width * 0.50, 18.0 );
At least that's my experience. NSIntegralRect, by the way, is likely
about to become invaluable.
- Scott
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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