@@ -6765,16 +6765,6 @@ else if (name.equals("paste")) {
67656765 getImage ().setOverlay (overlayClipboard );
67666766 return Double .NaN ;
67676767 } else if (name .equals ("pasteAndMerge" )) {
6768- /*
6769- interp.getParens();
6770- if (overlayClipboard==null)
6771- interp.error("Overlay clipboard empty");
6772- Overlay overlay = getImage().getOverlay();
6773- if (overlay!=null)
6774- getImage().setOverlay(overlay.add(overlayClipboard));
6775- else
6776- getImage().setOverlay(overlayClipboard);
6777- */
67786768 return Double .NaN ;
67796769 } else if (name .equals ("drawLabels" )) {
67806770 overlayDrawLabels = getBooleanArg ();
@@ -6798,11 +6788,13 @@ else if (name.equals("paste")) {
67986788 if (overlay ==null && name .equals ("size" )) {
67996789 interp .getParens ();
68006790 return 0.0 ;
6801- } else if (name .equals ("hidden" ))
6791+ } else if (name .equals ("hidden" )) {
68026792 return overlay !=null && imp .getHideOverlay ()?1.0 :0.0 ;
6803- else if (name .equals ("addSelection" ) || name .equals ("addRoi" ))
6793+ } else if (name .equals ("setMinStrokeWidth" )) {
6794+ return setMinStrokeWidth (imp , overlay );
6795+ } else if (name .equals ("addSelection" ) || name .equals ("addRoi" )) {
68046796 return overlayAddSelection (imp , overlay );
6805- else if (name .equals ("setPosition" )) {
6797+ } else if (name .equals ("setPosition" )) {
68066798 addDrawingToOverlay (imp );
68076799 return overlaySetPosition (overlay );
68086800 } else if (name .equals ("setFillColor" ))
@@ -6954,7 +6946,7 @@ private double activateSelection(ImagePlus imp, Overlay overlay, boolean wait) {
69546946 ResultsTable .selectRow (roi );
69556947 return Double .NaN ;
69566948 }
6957-
6949+
69586950 private double getOverlayElementBounds (Overlay overlay ) {
69596951 int index = (int )getFirstArg ();
69606952 Variable x = getNextVariable ();
@@ -6971,7 +6963,7 @@ private double getOverlayElementBounds(Overlay overlay) {
69716963 height .setValue (r .height );
69726964 return Double .NaN ;
69736965 }
6974-
6966+
69756967 double overlayAddSelection (ImagePlus imp , Overlay overlay ) {
69766968 String strokeColor = null ;
69776969 double strokeWidth = Double .NaN ;
@@ -7014,6 +7006,16 @@ private double getOverlayElementBounds(Overlay overlay) {
70147006 return Double .NaN ;
70157007 }
70167008
7009+ private double setMinStrokeWidth (ImagePlus imp , Overlay overlay ) {
7010+ double minStrokeWidth = getArg ();
7011+ if (overlay ==null ) {
7012+ overlay = new Overlay ();
7013+ imp .setOverlay (overlay );
7014+ }
7015+ overlay .setMinStrokeWidth (minStrokeWidth );
7016+ return Double .NaN ;
7017+ }
7018+
70177019 double overlaySetPosition (Overlay overlay ) {
70187020 int c =0 , z =0 , t =0 ;
70197021 int nargs = 1 ;
@@ -7813,7 +7815,10 @@ private Variable doRoi() {
78137815 return new Variable (Colors .colorToString (color ));
78147816 }
78157817 ImagePlus imp = getImage ();
7816- if (name .equals ("paste" )) {
7818+ if (name .equals ("setMinStrokeWidth" )) {
7819+ setMinStrokeWidth (imp , imp .getOverlay ());
7820+ return null ;
7821+ } else if (name .equals ("paste" )) {
78177822 interp .getParens ();
78187823 //IJ.log("paste: "+roiClipboard);
78197824 if (roiClipboard !=null )
0 commit comments