背景:使用UIBezierPath 和 CAShapeLayer 画封闭图形
NSMutableArray *bezierPoints = [NSMutableArray array];
CGPathApply(path.CGPath, (__bridge void *)(bezierPoints), MyCGPathApplierFunc);
UIBezierPath *tessss = [[UIBezierPath alloc]init];
for (int i = 0 ;i<bezierPoints.count;i++) {
NSValue *pointValue = bezierPoints[i];
CGPoint point = [pointValue CGPointValue];
if (i==0) {
[tessss moveToPoint:point];
}else{
[tessss addLineToPoint:point];
}
XLogPoint1(point);
}
[tessss closePath];
self.penShapeView.shapeLayer.path = tessss.CGPath ;
*/
/*
void MyCGPat

这篇博客探讨了如何使用UIBezierPath和CAShapeLayer来绘制封闭图形,并介绍了如何获取路径上的所有像素点,涉及图形与像素的交互。
最低0.47元/天 解锁文章
642

被折叠的 条评论
为什么被折叠?



