(int screenX, int screenY)
| 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) |
no test coverage detected