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

Method update

ij/src/main/java/ij/gui/ImageCanvas.java:160–168  ·  view source on GitHub ↗

Update this ImageCanvas to have the same zoom and scale settings as the one specified.

(ImageCanvas ic)

Source from the content-addressed store, hash-verified

158
159 /** Update this ImageCanvas to have the same zoom and scale settings as the one specified. */
160 void update(ImageCanvas ic) {
161 if (ic==null || ic==this || ic.imp==null)
162 return;
163 if (ic.imp.getWidth()!=imageWidth || ic.imp.getHeight()!=imageHeight)
164 return;
165 srcRect = new Rectangle(ic.srcRect.x, ic.srcRect.y, ic.srcRect.width, ic.srcRect.height);
166 setMagnification(ic.magnification);
167 setSize(ic.dstWidth, ic.dstHeight);
168 }
169
170 /** Sets the region of the image (in pixels) to be displayed. */
171 @AstroImageJ(reason = "Simply set srcRect to be the given rectangle, allowing for the image to be zoomed out " +

Callers

nothing calls this directly

Calls 5

setMagnificationMethod · 0.95
setSizeMethod · 0.95
paintMethod · 0.95
getWidthMethod · 0.45
getHeightMethod · 0.45

Tested by

no test coverage detected