MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / zoomToRect

Method zoomToRect

ij/src/main/java/ij/gui/Plot.java:2565–2573  ·  view source on GitHub ↗

Zooms to a range given in pixels and updates the image

(Rectangle r)

Source from the content-addressed store, hash-verified

2563
2564 /** Zooms to a range given in pixels and updates the image */
2565 void zoomToRect(Rectangle r) {
2566 saveMinMax();
2567 currentMinMax[0] = descaleX(r.x);
2568 currentMinMax[1] = descaleX(r.x + r.width);
2569 currentMinMax[2] = descaleY(r.y + r.height);
2570 currentMinMax[3] = descaleY(r.y);
2571 //snapToMinorGrid = true; //get nice bounds when zooming in
2572 updateImage();
2573 }
2574
2575 /**
2576 * Adjusts the plot range when the user clicks one of the overlay symbols at the

Callers 2

actionPerformedMethod · 0.80
zoomMethod · 0.80

Calls 4

saveMinMaxMethod · 0.95
descaleXMethod · 0.95
descaleYMethod · 0.95
updateImageMethod · 0.95

Tested by

no test coverage detected