Re: FYI: Cocoa's framework scaling works great!
Re: FYI: Cocoa's framework scaling works great!
- Subject: Re: FYI: Cocoa's framework scaling works great!
- From: "I. Savant" <email@hidden>
- Date: Wed, 26 Apr 2006 14:01:04 -0400
I think it boils down to developers providing the icons already
scaled (by better graphics apps) at various intervals (a la Icon
Composer) in .icns format - I believe Cocoa will "do the right thing".
--
I.S.
On Apr 26, 2006, at 1:11 PM, Mike Abdullah wrote:
I'm definitely interested to see how this whole resolution
independence thing is going to pan out. I guess my main concern is
going to be the icons for buttons and toolbar items, just how to
make sure they work correctly.
On 25 Apr 2006, at 00:25AM0, Ricky Sharp wrote:
While still a work-in-progress feature on Apple's part, I've
gotten my app to be resolution-independent savvy.
For those that may not know, you can access this "developer-only"
feature of the OS by:
- launching QuartzDebug
- select "Show User Interface Resolution" from the "Tools" menu
- adjust the slider to what you want.
- launch your app and see the results.
If you're using standard Apple UI controls, things will not be too
good as most of the controls still use bitmapped-based
components. However, if you have your own controls (like my app
does), you can achieve beautiful scaling at little or no cost to you.
Since all my drawing is done with vector-based PDFs, bezier paths
and the Cocoa text system, the framework (hence the name framework
scaling) kicks in and does the right thing for you.
The only areas where I had to adjust my code (as mentioned in the
AppKit release notes) was window sizing and positioning. But that
was only a few lines of code.
A recent thread about screenshots brought up the usage of
initWithFocusedViewRect:. That not only works in Tiger, but it
does the right thing for resolution independence. My app takes a
screenshot and coverts it to grayscale to serve as a background
for "dialogs". I am still able to use direct pixel access on the
captured screenshot and apply the grayscale algorithm to it. This
works at all scaling factors.
Finally, something I thought was really cool is that NSCursor, if
fed a vector-based image, will render beautifully at all scaling
factors. Note however that I am not sure if such an NSCursor will
employ a hardware-based solution***. I haven't seen any slowdowns
when using a scalable 64x64 pt image. Although I am running on a
dual 2GHz with an ATI-9800 Pro card. Not sure what kind of hit
this will be on slower systems.
*** NSCursor will attempt to use a hardware-based solution to
render your cursor. If it cannot, it falls back to a software-
based one.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden