Code example for Region

Methods: contains, setPath

0
	 * @return 
	 */ 
	public boolean InArea(float x,float y){
		RectF rectF = new RectF();
		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 
	 */ 
	public float getAngle(int iHour){
		float offset_angle = angle*(_iHour48-2);