Revision 18264 trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/georeferencing/ui/zoom/layers/ZoomCursorGraphicLayer.java

View differences:

ZoomCursorGraphicLayer.java
51 51
	private static final int    MOVE_UL = 5;
52 52
	private static final int    MOVE_LR = 6;
53 53
	private static final int    MOVE_LL = 7;
54
	
55
	private final int           MIN_CURSOR_SIZE = 10;
54 56
	private int                 operation = NONE; 
55 57
	
56 58
	private Color               color = Color.RED;
......
130 132
	 */
131 133
	public void draw(Graphics2D g, Rectangle2D ext, int w, int h) {
132 134
		g.setColor(Color.RED);
135
		wCursor = Math.max(wCursor, MIN_CURSOR_SIZE); 
136
		hCursor = Math.max(hCursor, MIN_CURSOR_SIZE);
133 137
		g.drawRect(posX - (wCursor >> 1), posY - (hCursor >> 1), wCursor, hCursor);
134 138
		g.drawLine(posX, posY - (hCursor >> 1), posX, 0);
135 139
		g.drawLine(posX, posY + (hCursor >> 1), posX, h);
......
289 293
			setOperation(REDIM_DOWN);
290 294
			return;
291 295
		}
296
		setOperation(NONE);
292 297
		canvas.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
293 298
	}
294 299
	

Also available in: Unified diff