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: John Stiles <email@hidden>
- Date: Wed, 26 Apr 2006 10:17:25 -0700
I think the Dock is a good example of how icons can scale well. My
assumption is that we will probably be able to provide high-res
toolbar icons which the OS will gracefully scale down. For older apps
which have 72-dpi icons, they will be scaled up and may look a bit
fuzzy.
BTW, Dave Hyatt recently made some posts on his blog about how Safari
will support high-res images in a way that's (supposed to be)
backwards-compatible with existing HTML. This is clearly targeting
Apple tech which sits on top of HTML for convenience's sake, like
Dashboard widgets and Apple Help. But an ambitious web designer could
make a high-DPI-savvy web page as well.
On Apr 26, 2006, at 10:11 AM, 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:
40blizzard.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