     }
 }
 
-fileprivate func pathAnimation(from:Locus, to: Locus, duration: Double, offset: Point) -> CAAnimation {
+fileprivate func pathAnimation(from:Locus, to: Locus, duration: Double, renderTransform: CGAffineTransform) -> CAAnimation {
     
-    var offsetTransform = CGAffineTransform.init(translationX: CGFloat(offset.x), y: CGFloat(offset.y))
-    let fromPath = RenderUtils.toCGPath(from).copy(using: &offsetTransform)
-    let toPath = RenderUtils.toCGPath(to).copy(using: &offsetTransform)
+    var transform = renderTransform
+    let fromPath = RenderUtils.toCGPath(from).copy(using: &transform)
+    let toPath = RenderUtils.toCGPath(to).copy(using: &transform)
     
     let animation = CABasicAnimation(keyPath: "path")
     animation.fromValue = fromPath

        animation.onProgressUpdate?(t)
    }
    
    let layer = animationCache.layerForNode(shape, animation: animation, shouldRenderContent: false)
    layer.path = RenderUtils.toCGPath(fromLocus)
    
    // Stroke

    let fromLocus = morphingAnimation.getVFunc()(0.0)
    let toLocus = morphingAnimation.getVFunc()(animation.autoreverses ? 0.5 : 1.0)
    
    let layer = animationCache.layerForNode(shape, animation: animation, shouldRenderContent: false)
    
    // Creating proper animation
    let generatedAnim = pathAnimation(
        from:fromLocus,
        to:toLocus,
        duration: animation.getDuration(),
        renderTransform: layer.renderTransform!)
    
    generatedAnim.repeatCount = Float(animation.repeatCount)
    generatedAnim.timingFunction = caTimingFunction(animation.easing)
