문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top