Union UIBezierPaths rather than apend path

后端 未结 3 1014
误落风尘
误落风尘 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-03 11:52

    You can use the GPCPolygon, an Objective-C wrapper for GPC

    -GPCPolygonSet*) initWithPolygons:(NSMutableArray*)points;

    or

    - (GPCPolygonSet*) unionWithPolygonSet:(GPCPolygonSet*)p2;

提交回复
热议问题