MonoTouch finger paint sample
-
25-09-2019 - |
문제
Is there any sample code for MonoTouch or MonoDroid that shows how to get the current touch points and draw them to the screen (i.e. a fingerpaint like app)?
해결책
I also have a CoreGraphics blog post that shows how to get touches here: http://mikebluestein.wordpress.com/2010/02/21/drawing-with-coregraphics-in-monotouch-2/
다른 팁
See the GLPaint example in the monotouch samples https://github.com/migueldeicaza/monotouch-samples
I'm not sure about a fingerpaint app, but the Monotouch.Dialog on github (https://github.com/migueldeicaza/MonoTouch.Dialog) has examples for both detecting touches, as well as drawing lines & arcs to a graphics context. You could try combining those two code samples. Also, check into Quartz2d for the drawing - I believe it is a bit more efficient for extensive drawing.