ios - Draw an image once and then draw on it with finger (MonoTouch) -
i can draw picture , draw finger on following code:
public override void draw (rectanglef rect) { base.draw (rect); using (cgcontext context = uigraphics.getcurrentcontext()) { // draw image in context context.drawimage (rectangle, imagetodraw.cgimage); // draw finger touch if (this.fingerdraw) { context.setstrokecolor (uicolor.black.cgcolor); context.setlinewidth (5f); context.setlinecap (cglinecap.round); this.drawpath.movetopoint (this.prevtouchlocation); this.drawpath.addlinetopoint (this.touchlocation); context.addpath (this.drawpath); context.drawpath (cgpathdrawingmode.stroke); } } }
however brings me performance problems, expensive draw image every time user touches screen.
how can draw image once @ beginning , draw finger touch?
don't draw on image. put image in view that's underneath fingerdraw
view.
Comments
Post a Comment