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

Method setRoundRectArcSize

ij/src/main/java/ij/gui/Toolbar.java:1065–1077  ·  view source on GitHub ↗

Sets the rounded rectangle corner diameter (pixels).

(int size)

Source from the content-addressed store, hash-verified

1063
1064 /** Sets the rounded rectangle corner diameter (pixels). */
1065 public static void setRoundRectArcSize(int size) {
1066 if (size<=0)
1067 rectType = RECT_ROI;
1068 else {
1069 arcSize = size;
1070 Prefs.set(CORNER_DIAMETER, arcSize);
1071 }
1072 repaintTool(RECTANGLE);
1073 ImagePlus imp = WindowManager.getCurrentImage();
1074 Roi roi = imp!=null?imp.getRoi():null;
1075 if (roi!=null && roi.getType()==Roi.RECTANGLE)
1076 roi.setCornerDiameter(rectType==ROUNDED_RECT_ROI?arcSize:0);
1077 }
1078
1079 /** Returns 'true' if the multi-point tool is enabled. */
1080 public static boolean getMultiPointMode() {

Callers 1

dialogItemChangedMethod · 0.95

Calls 6

setMethod · 0.95
repaintToolMethod · 0.95
getCurrentImageMethod · 0.95
getRoiMethod · 0.95
getTypeMethod · 0.95
setCornerDiameterMethod · 0.95

Tested by

no test coverage detected