Skip to content

Instantly share code, notes, and snippets.

@yarneo
Created January 3, 2019 21:48
Show Gist options
  • Save yarneo/f2f7ffb97da2987dae095802e9ae54f5 to your computer and use it in GitHub Desktop.
Save yarneo/f2f7ffb97da2987dae095802e9ae54f5 to your computer and use it in GitHub Desktop.
- (MDCPathGenerator *)pathGeneratorForCornerWithAngle:(CGFloat)angle
andRadius:(CGFloat)radius {
MDCPathGenerator *path =
[MDCPathGenerator pathGeneratorWithStartPoint:CGPointMake(0, radius)];
[path addArcWithTangentPoint:CGPointZero
toPoint:CGPointMake(MDCSin(angle) * radius, MDCCos(angle) * radius)
radius:radius];
return path;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment