iphone Programming Glossary: from.y
Drawing triangle/arrow on a line with CGContext http://stackoverflow.com/questions/2500197/drawing-triangle-arrow-on-a-line-with-cgcontext 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 line between the 2 endpoint CGContextMoveToPoint context from.x length.. 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 context to.x length cosy to.y length siny paints a line along the current path CGContextStrokePath.. part actually drawing the arrows a total of 6 lines drawn to make the arrow shape CGContextMoveToPoint context from.x from.y CGContextAddLineToPoint context from.x length cosy width 2.0 siny from.y length siny width 2.0 cosy CGContextAddLineToPoint..
How to erase part of an image as the user touches it http://stackoverflow.com/questions/2978382/how-to-erase-part-of-an-image-as-the-user-touches-it s image.size UIGraphicsBeginImageContext s CGContextRef g UIGraphicsGetCurrentContext CGContextMoveToPoint g from.x from.y CGContextAddLineToPoint g to.x to.y CGContextClosePath g CGContextAddRect g CGRectMake 0 0 s.width s.height CGContextEOClip..
|