exyte / Macaw

Powerful and easy-to-use vector graphics Swift library with SVG support
MIT License
6k stars 552 forks source link

Make SVG render in an external CALayer [improvement] #771

Open NeedNap opened 2 years ago

NeedNap commented 2 years ago

Is it possible to add a method which draws the entire svg in a CALayer passed as parameter? I need this feature for my complex drawing app which is using the CALayers to improve the overall performances.

Thanks

NeedNap commented 2 years ago

At the moment I changed the Macaw source code adding this simple var on the MacawView class:

public var drawingLayer: CALayer {
    get {
        return drawingView.layer
    }
}

so I can grab the drawing layer from the outside and using it changing its superlayer... And it works fine but now I can't update your lib anymore otherwise I'll loose my changes.

Can you add this code in the new version, please?