* In this case we will automatically move the coord system
* to put the selection rectangle into the upper left
* corner of the euclidian view.
*/
private void checkEuclidianView() {
EuclidianView ev = app.getEuclidianView();
// 1) selection rectangle
Rectangle rect = ev.getSelectionRectangle();
if (rect != null) {
double xZero = ev.getXZero() - rect.x;
double yZero = ev.getYZero() - rect.y;
rect.x = 0;
rect.y = 0;
ev.setCoordSystem(xZero, yZero, ev.getXscale(), ev.getYscale(), true);
// update size panel
int width = sizePanel.getSelectedWidth() - (ev.getWidth() - rect.width);
int height = sizePanel.getSelectedHeight() - (ev.getHeight() - rect.height);
sizePanel.setValues(width, height, false);
}
}