public void flyMe(CanvasRenderingContext2D ctx, int i) { container.Children.Clear(); ctx.save(); ctx.translate(0, Math.Cos(i*0.1)*40); double a = Math.Sin(i*0.1); // right wing ctx.save(); ctx.rotate(Math.PI*0.4); wing(ctx, 8, a); ctx.commit(); ctx.restore(); // left wing ctx._path.GetNumberOfCommits(); ctx._path.GetNumberOfPaths(); ctx.save(); ctx.scale(-1, 1); ctx.rotate(Math.PI*0.4); wing(ctx, 8, a); ctx.commit(); ctx.restore(); Debugger.Log(0, "Timing", "Left wing, Commits:" + ctx._path.GetNumberOfCommits()); Debugger.Log(0, "Timing", "Left wing, Paths:" + ctx._path.GetNumberOfPaths()); // tail ctx.save(); tail(ctx, 10, Math.Sin(i*0.05)); ctx.commit(); ctx.restore(); // head neck(ctx, 12); ctx.commit(); ctx.restore(); }