On Aug 25, 2011, at 2:36 PM, Arbit Richardi wrote: > Given the following code snip: > > NSRect newFrame = [myWindow frame]; > newFrame.size.width = 772.16; > [myWindow setFrame:newFrame display:YES]; > NSLog(@"%f", [myWindow frame].size.width); > > The output is: 773.000000, and in fact, the window is drawn 773 points > wide on my MacBook Pro. > > Why do windows prefer whole points?
Because at 72 DPI, all AppKit frame coordinates are/should be expressed using integral numbers only. Typically only Bézier paths are drawn with sub-pixel coordinates at that resolution. > Is there another method that will > draw windows at non-whole number point sizes? No. What are you trying to accomplish? > Is this behavior the > same on higher-resolution devices? Maybe. Did you try it? You can see for yourself by running Quartz Debug and choosing "UI resolution" in the Window menu. Nick Zitzmann <http://www.chronosnet.com/> _______________________________________________ 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