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){
		return angle*(iHour-1)-90;