Most recent edit on 2008-04-25 19:45:40 by BradEllis
Additions:
Back to Acorn -> Acorn Plugins
Edited on 2007-09-24 21:25:46 by GusMueller
Additions:
For a set of classes you can use to display an Acorn image, download the source to Acorn's Quick Look plugin:
http://flyingmeat.com/download/latest/AcornQuickLook.zip∞
Edited on 2007-09-17 17:11:41 by GusMueller
Additions:
For the individual shapes, you'll find the in the "GraphicsList" key in a shape layer. The "Class" key will tell you what kind of shape it is, the "Bounds" key will tell you where it is located in the layer. There are a handful of other attributes, which should be pretty explanatory.
Oldest known version of this page was edited on 2007-09-17 17:06:14 by GusMueller []
Page view:
Acorn's File Format
Disclaimer: This information may change in a future release, and only represents Acorn at version 1.0.
The Acorn file format at a high level, is a serialized NSDictionary, written out in a binary plist format. You can open it up in Property List Editor and snoop around. For the most part, it's self explanatory. It might even look a little bit like what you'd find in /Developer/Examples/
AppKit/Sketch/.
The data for the bitmap images is found in the key "
TSBitmapLayerCompressedImageDataKey". You can reconstruct it by decompressing it using zlib, and then handing it off to
CGBitmapContextCreate with the size information taken from the
TSBitmapLayerSizeKey key. 8 bits per component, kCGImageAlphaPremultipliedFirst. The key "
TSBitmapLayerDrawDelta" is what the translation is from the document's canvas size.
The "class" key lets you know if the layer is a shape or bitmap layer. The string "
TSBitmapLayer" is a bitmap layer, and the string "
TSShapeLayer" is for a shape layer.