Union UIBezierPaths rather than apend path

后端 未结 3 1013
误落风尘
误落风尘 2020-12-03 11:17

I have an app where I take a UIBezierPath and use it as a brush by a series of appendPath: calls. After a few goes and with really complex brush shapes the memory runs out a

3条回答
  •  醉酒成梦
    2020-12-03 12:08

    Finally a solution!!

    Using https://github.com/adamwulf/ClippingBezier you can find the intersecting points. Then you can walk through the path, turning left if clockwise or vice-versa to stay on the outside. Then you can generate a new path using the sequence of points.

提交回复
热议问题