1
UIBezierPathの外側のエッジを作る:私は現在とても似UIBezierPath以内にUIImageを描いていた半透明の
UIGraphicsBeginImageContextWithOptions(rect.size, NO, 0);
UIBezierPath *polygonPath = [UIBezierPath bezierPath];
CGPoint curPoint = [self originalPoint:[[drawArray objectAtIndex:0]CGPointValue]];
// set the starting point for the lines
[polygonPath moveToPoint:curPoint];
// go through each point in drawArray and add it to polygonPath
for(NSInteger i = 1; i < [drawArray count]; i++) {
curPoint = [self originalPoint:[[drawArray objectAtIndex:i]CGPointValue]];
// scale point
curPoint = CGPointMake(curPoint.x, curPoint.y);
[polygonPath addLineToPoint:curPoint];
}
[polygonPath closePath];
[polygonPath addClip];
[image drawAtPoint:CGPointZero];
しかし、私は少し、「滑らかなエッジ」を持っているしたいのですが、素晴らしい作品私は別のイメージの上にそれを描画しているように、イメージの透明...今すぐエッジはかなりラフです。あなたの助けのための
ありがとう!