• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSProgressIndicator drawing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSProgressIndicator drawing (From: Adam Johnson <email@hidden>)
 >Re: NSProgressIndicator drawing (From: "Alan Smith" <email@hidden>)
 >Re: NSProgressIndicator drawing (From: Adam Johnson <email@hidden>)

  • Prev by Date: Re: NSProgressIndicator drawing
  • Next by Date: Re: NUL characters in NSString cause unexpected results
  • Previous by thread: Re: NSProgressIndicator drawing
  • Next by thread: Re: NSProgressIndicator drawing
  • Index(es):
    • Date
    • Thread