Code example for RectF

Methods: height, width

0
	private void ensureVisibility(int screen_width, int screen_height)
	{ 
		float []curPos = new float[2];
		translationMatrix.mapPoints(curPos);
		 
	    if (curPos[0] > (screen_width - pointerRect.width()))
	    	curPos[0] = screen_width - pointerRect.width();
	    if (curPos[0] < 0)
	    	curPos[0] = 0;
	    if (curPos[1] > (screen_height - pointerRect.height()))
	    	curPos[1] = screen_height - pointerRect.height();
	    if (curPos[1] < 0)
	    	curPos[1] = 0;
 
	    translationMatrix.setTranslate(curPos[0], curPos[1]);
	    setImageMatrix(translationMatrix);	
	} 
	 
	private void displayPointerImageAction(int resId)
	{ 
		setPointerImage(resId);