Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Resolution independent artwork



Thanks for the info Mike...this is exactly what I was looking for.

On Sep 17, 2008, at 12:19 PM, Mike Swingler wrote:

On Sep 17, 2008, at 6:19 AM, Ken Orr wrote:

What's the best way to integrate resolution independent vector based
artwork into a Java Mac App? There isn't really support for creating
icons from PDF files (as far as I know). I know Kirill Grouchnikov
(and Mike Swingler?) talked about resolution independence as it
relates to Java at this years JavaOne (2008), but I don't know if
they touched on anything like this.

The platform-dependent way we brought resolution independent artwork to Java was though Toolkit.getImage("NSImage://<your-image>"). If your application is a bundled app, you can put PDF, ICNS, multi-res TIFF, and a bunch of other formats in your bundle's Contents/Resources/ directory, and they will be picked up by the [NSImage imageNamed:] machinery. You can also ask for standard system art which is available from the AppKit/NSImage.h, with a slight change to the name of the constants.

If you need a platform-independent way, Kirill discusses how to use an
SVG to Java2D transcoder that will create Java classes that paint in
Java2D based on an SVG file you give it: http://weblogs.java.net/blog/kirillcool/archive/2006/10/svg_and_java_ui_3.html
 .

Hope this helps,
Mike Swingler
Java Runtime Engineer
Apple Inc.

_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Resolution independent artwork (From: Ken Orr <email@hidden>)
 >Re: Resolution independent artwork (From: Mike Swingler <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.