| 98 | } |
| 99 | |
| 100 | protected void handleMouseUp(int screenX, int screenY) { |
| 101 | mouseUpCount++; |
| 102 | if (Prefs.enhancedLineTool && mouseUpCount==1 && !dragged) |
| 103 | return; |
| 104 | state = NORMAL; |
| 105 | if (imp==null) return; |
| 106 | imp.draw(clipX-5, clipY-5, clipWidth+10, clipHeight+10); |
| 107 | if (IJ.recording()) { |
| 108 | String method = (this instanceof Arrow)?"makeArrow":"makeLine"; |
| 109 | Recorder.record(method, x1, y1, x2, y2); |
| 110 | } |
| 111 | if (getLength()==0.0) |
| 112 | imp.deleteRoi(); |
| 113 | } |
| 114 | |
| 115 | protected void drawLine(int sx, int sy) { |
| 116 | double xend = offScreenXD(sx); |