saving a layer tree to an image file...
With the advent of iPhone and Leopard CALayer - or whole layer trees - often get used in favor of NSViews. The CALayer and its subclasses offer many convenient ways of getting data displayed quickly and - since we all like eye candy - with subtle and less subtle animations. Blending in or out datasets of a complex graph using a fade effect for free is just nice. While revamping bcAdmin, my biggest application so far, I decided to make use of layer trees to display calls of bats, activity diagrams and the such. After getting into the way layers are hosted, drawn and animated, I had all the tools to write classes for graphs like I never was able before. Or not that easily at least. I need a print out. ... ... which was easy to get from a NSView. Not so easy from a view hosting (in any kind) layers. The images produced with the connivence methods for printing - the ones I used all the years before - produced rather empty images... Not finding a quick solution at first, I started to write ...