Code example for PointF

Methods: set

0
	} 
 
	private void calculatePointerMean(MotionEvent event, PointF p) {
		float x = (event.getX(0) + event.getX(1)) / 2f;
		float y = (event.getY(0) + event.getY(1)) / 2f;
		p.set(x, y);
	} 
 
	@Override 
	public boolean onTouch(View view, MotionEvent event) {
 
		PointF touchPoint = new PointF(event.getX(), event.getY());
		mPerspective.convertFromScreenToCanvas(touchPoint);
 
		switch (event.getAction()) {
		case MotionEvent.ACTION_DOWN:
			PaintroidApplication.currentTool.handleDown(touchPoint);
			break; 
		case MotionEvent.ACTION_MOVE:
			if (event.getPointerCount() == 1) {
				if (System.nanoTime() < (mZoomTimeStamp + BLOCKING_TIME)) {