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

Method setWidth

ij/src/main/java/ij/gui/Line.java:627–640  ·  view source on GitHub ↗

Sets the default line width. Use setStrokeWidth() to set the width of a Line instance. @see #setStrokeWidth

(int w)

Source from the content-addressed store, hash-verified

625 * @see #setStrokeWidth
626 */
627 public static void setWidth(int w) {
628 if (w<1) w = 1;
629 int max = 500;
630 if (w>max) {
631 ImagePlus imp2 = WindowManager.getCurrentImage();
632 if (imp2!=null) {
633 max = Math.max(max, imp2.getWidth());
634 max = Math.max(max, imp2.getHeight());
635 }
636 if (w>max) w = max;
637 }
638 lineWidth = w;
639 widthChanged = true;
640 }
641
642 /* Sets the width of this line. */
643 public void setStrokeWidth(float width) {

Callers 5

restoreSettingsMethod · 0.95
plotLanesMethod · 0.95
lineWidthMethod · 0.95
runMethod · 0.95
setDefaultStrokeWidthMethod · 0.95

Calls 4

getCurrentImageMethod · 0.95
getWidthMethod · 0.95
getHeightMethod · 0.95
maxMethod · 0.45

Tested by

no test coverage detected