¡@

Home 

2014/10/15 ¤U¤È 10:14:13

iphone Programming Glossary: siny

Drawing triangle/arrow on a line with CGContext

http://stackoverflow.com/questions/2500197/drawing-triangle-arrow-on-a-line-with-cgcontext

share improve this question void drawLine CGContextRef context from CGPoint from to CGPoint to double slopy cosy siny Arrow size double length 10.0 double width 5.0 slopy atan2 from.y to.y from.x to.x cosy cos slopy siny sin slopy draw a.. slopy cosy siny Arrow size double length 10.0 double width 5.0 slopy atan2 from.y to.y from.x to.x cosy cos slopy siny sin slopy draw a line between the 2 endpoint CGContextMoveToPoint context from.x length cosy from.y length siny CGContextAddLineToPoint.. slopy siny sin slopy draw a line between the 2 endpoint CGContextMoveToPoint context from.x length cosy from.y length siny CGContextAddLineToPoint context to.x length cosy to.y length siny paints a line along the current path CGContextStrokePath..