MMLayershots
MMLayershots copied to clipboard
Flat Rendering into one CGContext with respecting Z-Order
Hey,
First of all this is a very cool project, thank you!
I'm currently trying to render a failry large CALayer-hierarchy (consisting of all kinds of layers, CAShapeLayer, CAReplicatorLayer, CATransformLayer, CATextLayer, etc) into one single CGContext with respectiing z-Order. I have tested MMLayershots w/o modification on it (besides reducing the quality to 0.25, since it will crash due to the memory overflow you've mentioned in another thread) and it renders every layer in the perfect position, just the z-Order is different from the one on the screen. I'm using the zTranslation of the CATransform3D t o change the zOrder of my layers.
-
What could I possibly do to have it render correctly with respecting zOrder?
-
Can you think of an easy way, how to make it all render in to one single CGContext, instead of one context per image? (All my tries to just render it manually, i.e. rendering the root layer and have it render its children failed by either having a wrong z-Order or wrong x/y positions)
I hope you can help me on this and we could possibly enhance MMLayershots with those features!
Best, Max