Tag: uibezierpath

UIBezierPath减去path

通过使用[UIBezierPath bezierPathWithRoundedRect:byRoundingCorners:cornerRadii:] ,我可以创build一个四舍五入的视图,如: 我怎么能从这个(或其他方式)减去另一条path,来创build一个这样的path: 有什么办法可以做这样的事吗? 伪代码: UIBezierPath *bigMaskPath = [UIBezierPath bezierPathWithRoundedRect:bigView.bounds byRoundingCorners:(UIRectCornerTopLeft|UIRectCornerTopRight) cornerRadii:CGSizeMake(18, 18)]; UIBezierPath *smallMaskPath = [UIBezierPath bezierPathWithRoundedRect:smalLView.bounds byRoundingCorners:(UIRectCornerTopLeft|UIRectCornerTopRight) cornerRadii:CGSizeMake(18, 18)]; UIBezierPath *finalPath = [UIBezierPath pathBySubtractingPath:smallMaskPath fromPath:bigMaskPath];

如何在iPhone上绘制“语音泡泡”?

我试图得到一个类似于Mac OS X中的“语音气泡”效果,当你点击在docker上的东西。 这是我现在拥有的: 我需要得到较低部分的“三angular形”部分。 有什么办法可以画出这样的东西,并得到一个边界吗? 这将是一个iPhone应用程序。 提前致谢! 编辑:非常感谢Brad Larson,现在看起来像这样:

沿着贝塞尔path放置图像

有谁知道如何沿着贝塞尔path放置图像? 我可以写好path并沿pathanimation一个精灵,但是我想让path成为一系列箭头而不是虚线。 我认为必须有一种方法可以在path上添加箭头图像,但无法find它。 path也是弯曲的: UIBezierPath * path = [UIBezierPath bezierPath]; [path moveToPoint:startingPoint]; [path addCurveToPoint:endPoint controlPoint1:controlPoint1 controlPoint2:controlPoint2];

如何从UIBezierPath获取点列表?

我有一个UIBezierPath ,我需要从一个点列表。 在Qt有一个名为pointAtPercent的函数, pointAtPercent我的需求,但在Objective-C我找不到任何相同的东西。 有谁知道如何做到这一点?