- Timestamp:
- 2008-09-22T01:22:39+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/SelectionManager.java
r999 r1003 230 230 231 231 if (aspectRatio) { 232 // keep the aspect ration by shrinking the rectangle 232 /* Keep the aspect ratio by growing the rectangle; the 233 * rectangle is always under the cursor. */ 233 234 double aspectRatio = (double)nc.getWidth()/nc.getHeight(); 234 if ((double)w/h >aspectRatio) {235 if ((double)w/h < aspectRatio) { 235 236 int neww = (int)(h*aspectRatio); 236 237 if (mousePos.x < mousePosStart.x) 237 x += w -neww;238 x += w - neww; 238 239 w = neww; 239 240 } else { 240 241 int newh = (int)(w/aspectRatio); 241 242 if (mousePos.y < mousePosStart.y) 242 y += h -newh;243 y += h - newh; 243 244 h = newh; 244 245 }
Note:
See TracChangeset
for help on using the changeset viewer.