Code example for Region

Methods: contains, setPath

0
		RectF rectF = new RectF();
		if (currentPath == null) {
			getCurrentPath(); 
		} 
		currentPath.computeBounds(rectF, true);
		Region region = new Region();
		region.setPath(currentPath, new Region((int) rectF.left,
				(int) rectF.top, (int) rectF.right, (int) rectF.bottom));
		if (region.contains((int) x, (int) y)) {
			return true; 
		} else { 
			return false; 
		} 
	} 
 
	/** 
	 * 计算当前半小时段的角度 
	 *  
	 * @param iHour 
	 *            要计算的半小时段,一天分48个段 
	 * @return