iphone Programming Glossary: firsttouch
How to draw signature with lines on iPhone screen? http://stackoverflow.com/questions/679983/how-to-draw-signature-with-lines-on-iphone-screen to its 'touchesMoved' method. void touchesMoved NSSet touches withEvent UIEvent event UITouch touch touches anyObject firstTouch touch locationInView self CGSize mySize CGSizeMake 5 5 UIGraphicsBeginImageContext mySize CGContextRef ctx UIGraphicsGetCurrentContext.. UIImageView redRectView UIImageView alloc initWithImage redRect redRectView.center CGPointMake firstTouch.x firstTouch.y self addSubview redRectView I'm drawing it with small rectangles and it turns out to be dot by dot. As.. UIImageView redRectView UIImageView alloc initWithImage redRect redRectView.center CGPointMake firstTouch.x firstTouch.y self addSubview redRectView I'm drawing it with small rectangles and it turns out to be dot by dot. As it is too ugly..
Save OpenGL Drawn item as a Image http://stackoverflow.com/questions/9660723/save-opengl-drawn-item-as-a-image NSSet touches withEvent UIEvent event CGRect bounds self bounds UITouch touch event touchesForView self anyObject firstTouch YES Convert touch point from UIView referential to OpenGL one upside down flip location touch locationInView self location.y.. event touchesForView self anyObject Convert touch point from UIView referential to OpenGL one upside down flip if firstTouch firstTouch NO previousLocation touch previousLocationInView self previousLocation.y bounds.size.height previousLocation.y.. touchesForView self anyObject Convert touch point from UIView referential to OpenGL one upside down flip if firstTouch firstTouch NO previousLocation touch previousLocationInView self previousLocation.y bounds.size.height previousLocation.y else location..
Record the drawing as a m4v video file - OpenGL http://stackoverflow.com/questions/9661259/record-the-drawing-as-a-m4v-video-file-opengl NSSet touches withEvent UIEvent event CGRect bounds self bounds UITouch touch event touchesForView self anyObject firstTouch YES Convert touch point from UIView referential to OpenGL one upside down flip location touch locationInView self location.y.. event touchesForView self anyObject Convert touch point from UIView referential to OpenGL one upside down flip if firstTouch firstTouch NO previousLocation touch previousLocationInView self previousLocation.y bounds.size.height previousLocation.y.. touchesForView self anyObject Convert touch point from UIView referential to OpenGL one upside down flip if firstTouch firstTouch NO previousLocation touch previousLocationInView self previousLocation.y bounds.size.height previousLocation.y else location..
|