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

Method move

ij/src/main/java/ij/gui/Line.java:156–173  ·  view source on GitHub ↗
(int sx, int sy)

Source from the content-addressed store, hash-verified

154 private static final double[] PI_MULT = {0, 1}; // y/x for horizontal (0 degrees) and 45 deg
155
156 void move(int sx, int sy) {
157 int xNew = offScreenX(sx);
158 int yNew = offScreenY(sy);
159 x += xNew - startxd;
160 y += yNew - startyd;
161 clipboard=null;
162 startxd = xNew;
163 startyd = yNew;
164 updateClipRect();
165 if (ignoreClipRect)
166 imp.draw();
167 else
168 imp.draw(clipX, clipY, clipWidth, clipHeight);
169 oldX = x;
170 oldY = y;
171 oldWidth = width;
172 oldHeight=height;
173 }
174
175 protected void moveHandle(int sx, int sy) {
176 if (constrain && activeHandle == 2) { // constrain translation in 90deg steps

Callers

nothing calls this directly

Calls 4

updateClipRectMethod · 0.80
offScreenXMethod · 0.45
offScreenYMethod · 0.45
drawMethod · 0.45

Tested by

no test coverage detected