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: format for editable vector graphics exchange




On Aug 10, 2007, at 2:13 PM, Erik Buck wrote:

Could W3C/Adobe's Scalable Vector Graphics (SVG) http:// en.wikipedia.org/wiki/Scalable_Vector_Graphics be the answer ? Is there a non-java implementation of SVG that I can embed in my Cocoa applications ?

SVG has lots of advantages - it's fairly simple to create (being XML, one can even directly create it out of other XML data using XSLT), and easy enough to parse to extract information (again, it's XML, so you can use all the XML code that is already provided for you). It easily supports additional meta data (on the file as well as any element in the file) which are a much more flexible version of custom pic comments in PICT files. Its rendering model is _very_ similar to Quartz's as well.


It can also be displayed using WebKit (such as the version that comes with Safari 3.0 betas).

The only major drawbacks are that there is no "intrinsic" support (like there is for TIFF, PDF), though one can write an NSImageRep subclass to handle a lot of that for you, and it has outside dependancies (Safari 3.0 beta which requires 10.4.9). The other major drawback is that there is so that has been thrown into SVG it's all but impractical to have something _fully_ support _all_ the features (since it includes animation, JavaScript, filters not entirely unlike CoreImage, embedded fonts, etc...)

I've been working (on and off) on an SVG library that runs all the way back to 10.3.9 that I've used in a product. Basically, I needed a simple "shape" library, and it was just easier to write an SVG parser and use Inkspot to create the SVGs instead of creating a simpler format and trying to create the images by editing the raw files - it was a couple of days to get most of the common things working, so it's definitely doable (you can grab my "SVG Detective" utility to see an earlier version of the library in action).




Glenn Andreas email@hidden <http://www.gandreas.com/> wicked fun! Cardographer | the custom playing card designer


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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/email@hidden

This email sent to email@hidden
References: 
 >format for editable vector graphics exchange (From: Erik Buck <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.