@Override public boolean onTouchEvent(MotionEvent e) { float x = e.getX(); float y = e.getY(); /* very brutal way */ if (mRenderer.buttonClick(x, y)) return true; Point p = new Point(Math.round(x), Math.round(y)); if (e.getAction() == MotionEvent.ACTION_UP) drawController.handleInput(p, 0); else drawController.handleInput(p, 1); return true; }
public void onModelUpdate() { Point p = drawModel.getDrawPoint(); mRenderer.drawPoint(p.x, p.y); requestRender(); }
public void saveFrame() { mRenderer.saveFrame(Integer.toString(stitch.getDeviceID())); mRenderer.saveFrame("sketch"); }