Code example for PointF

Methods: set

0
 
	// 计算中点位置 
	private void midPoint(PointF point, MotionEvent event) {
		float x = event.getX(0) + event.getX(1);
		float y = event.getY(0) + event.getY(1);
		point.set(x / 2, y / 2);
	} 
 
	// 放大,缩小按钮点击事件 
	//@Override 
	public void onClick(View v) {
		if (v == zoomIn) {
			enlarge(); 
		} else if (v == zoomOut) {
			small(); 
		} 
	} 
 
	// 按钮点击缩小函数 
	private void small() { 
		int bmpWidth = bitmap.getWidth();