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

Method handleMouseUp

ij/src/main/java/ij/gui/Roi.java:1637–1662  ·  view source on GitHub ↗
(int screenX, int screenY)

Source from the content-addressed store, hash-verified

1635 }
1636
1637 protected void handleMouseUp(int screenX, int screenY) {
1638 state = NORMAL;
1639 if (imp==null) return;
1640 imp.draw(clipX-5, clipY-5, clipWidth+10, clipHeight+10);
1641 if (IJ.recording()) {
1642 String method;
1643 if (type==OVAL)
1644 Recorder.record("makeOval", x, y, width, height);
1645 else if (!(this instanceof TextRoi)) {
1646 if (cornerDiameter==0)
1647 Recorder.record("makeRectangle", x, y, width, height);
1648 else {
1649 if (Recorder.scriptMode())
1650 Recorder.recordCall("imp.setRoi(new Roi("+x+","+y+","+width+","+height+","+cornerDiameter+"));");
1651 else
1652 Recorder.record("makeRectangle", x, y, width, height, cornerDiameter);
1653 }
1654 }
1655 }
1656 if (Toolbar.getToolId()==Toolbar.OVAL&&Toolbar.getBrushSize()>0) {
1657 int flags = ic!=null?ic.getModifiers():16;
1658 if ((flags&16)==0) // erase ROI Brush
1659 {imp.draw(); return;}
1660 }
1661 modifyRoi();
1662 }
1663
1664 void modifyRoi() {
1665 if (previousRoi==null || previousRoi.modState==NO_MODS || imp==null)

Callers 3

handlePopupMenuMethod · 0.95
mouseReleasedMethod · 0.95
mouseReleasedMethod · 0.95

Calls 9

recordingMethod · 0.95
recordMethod · 0.95
scriptModeMethod · 0.95
recordCallMethod · 0.95
getToolIdMethod · 0.95
getBrushSizeMethod · 0.95
modifyRoiMethod · 0.95
getModifiersMethod · 0.80
drawMethod · 0.45

Tested by

no test coverage detected