/** * @deprecated * replaced by setStrokeWidth(int) */ public void setLineWidth(int width) { setStrokeWidth(width) ; }
/** * @deprecated * replaced by setStrokeWidth(int) */ public void setLineWidth(int width) { setStrokeWidth(width) ; }
/** This is a version of setStrokeWidth() that accepts a double argument. */ public void setStrokeWidth(double width) { setStrokeWidth((float)width); }
/** This is a version of setStrokeWidth() that accepts a double argument. */ public void setStrokeWidth(double width) { setStrokeWidth((float)width); }
/** Sets the stroke width of all the ROIs in this overlay. */ public void setStrokeWidth(Double width) { Roi[] rois = toArray(); for (int i=0; i<rois.length; i++) rois[i].setStrokeWidth(width); }
/** Sets the stroke width of all the ROIs in this overlay. */ public void setStrokeWidth(Double width) { Roi[] rois = toArray(); for (int i=0; i<rois.length; i++) rois[i].setStrokeWidth(width); }
public void updateWideLine(float width) { if (isLine()) { wideLine = true; setStrokeWidth(width); if (getStrokeColor()==null) { Color c = getColor(); setStrokeColor(new Color(c.getRed(),c.getGreen(),c.getBlue(), 77)); } } }
public void setStrokeWidth(float width) { super.setStrokeWidth(width); if (getStrokeColor()==Roi.getColor()) wideLine = true; }
public void setStrokeWidth(float width) { super.setStrokeWidth(width); if (getStrokeColor()==Roi.getColor()) wideLine = true; }
public void setShellsThickness(final int strokeWidth) { if (strokeWidth < 1) { removeShells(); return; } validateShells(); for (final Roi shell : shells) shell.setStrokeWidth(strokeWidth); }
public void updateWideLine(float width) { if (isLine()) { wideLine = true; setStrokeWidth(width); if (getStrokeColor()==null) { Color c = getColor(); setStrokeColor(new Color(c.getRed(),c.getGreen(),c.getBlue(), 77)); } } }
/** Copy the attributes (outline color, fill color, outline width) of 'roi2' to the this selection. */ public void copyAttributes(Roi roi2) { this. strokeColor = roi2. strokeColor; this.fillColor = roi2.fillColor; this.setStrokeWidth(roi2.getStrokeWidth()); this.setName(roi2.getName()); }
/** Copy the attributes (outline color, fill color, outline width) of 'roi2' to the this selection. */ public void copyAttributes(Roi roi2) { this. strokeColor = roi2. strokeColor; this.fillColor = roi2.fillColor; this.setStrokeWidth(roi2.getStrokeWidth()); this.setName(roi2.getName()); }
private void assignPropertiesToRoi(final Roi roi, final Overlay overlay) { roi.setName(overlay.getName()); roi.setStrokeWidth((float) overlay.getLineWidth()); roi.setStrokeColor(AWTColors.getColor(overlay.getLineColor())); final Color fillColor = AWTColors.getColor(overlay.getFillColor()); final Color colorWithAlpha = new Color(fillColor.getRed(), fillColor.getGreen(), fillColor.getBlue(), overlay.getAlpha()); roi.setFillColor(colorWithAlpha); }
/** Creates an Overlay from the specified ROI, and assigns it to this image. * @see #setOverlay(ij.gui.Overlay) */ public void setOverlay(Roi roi, Color strokeColor, int strokeWidth, Color fillColor) { roi.setStrokeColor(strokeColor); roi.setStrokeWidth(strokeWidth); roi.setFillColor(fillColor); setOverlay(new Overlay(roi)); }
/** Creates an Overlay from the specified ROI, and assigns it to this image. * @see #setOverlay(ij.gui.Overlay) */ public void setOverlay(Roi roi, Color strokeColor, int strokeWidth, Color fillColor) { roi.setStrokeColor(strokeColor); roi.setStrokeWidth(strokeWidth); roi.setFillColor(fillColor); setOverlay(new Overlay(roi)); }
void getStrokeWidthAndColor(Roi roi, int hdr2Offset) { double strokeWidth = getShort(STROKE_WIDTH); if (hdr2Offset>0) { double strokeWidthD = getFloat(hdr2Offset+FLOAT_STROKE_WIDTH); if (strokeWidthD>0.0) strokeWidth = strokeWidthD; } if (strokeWidth>0.0) roi.setStrokeWidth(strokeWidth); int strokeColor = getInt(STROKE_COLOR); if (strokeColor!=0) { int alpha = (strokeColor>>24)&0xff; roi.setStrokeColor(new Color(strokeColor, alpha!=255)); } int fillColor = getInt(FILL_COLOR); if (fillColor!=0) { int alpha = (fillColor>>24)&0xff; roi.setFillColor(new Color(fillColor, alpha!=255)); } }
void addRoi(ImagePlus imp, Roi roi){ Overlay overlay = imp.getOverlay(); if (overlay==null || overlay.size()==0) { if (offscreenOverlay==null) offscreenOverlay = new Overlay(); overlay = offscreenOverlay; } if (defaultColor!=null) roi.setStrokeColor(defaultColor); roi.setStrokeWidth(getProcessor().getLineWidth()); overlay.add(roi); }
void addRoi(ImagePlus imp, Roi roi){ Overlay overlay = imp.getOverlay(); if (overlay==null || overlay.size()==0) { if (offscreenOverlay==null) offscreenOverlay = new Overlay(); overlay = offscreenOverlay; } if (defaultColor!=null) roi.setStrokeColor(defaultColor); roi.setStrokeWidth(getProcessor().getLineWidth()); overlay.add(roi); }
private void overlayOptions() { final OptionsOverlay options = optionsService.getOptions(OptionsOverlay.class); final Roi defaultRoi = getIJ1DefaultRoi(); // NB - setStrokeWidth() must be called before setFillColor() or fill info // gets lost going to IJ1 when stroke width > 1. defaultRoi.setStrokeWidth(options.getLineWidth()); Color color = AWTColors.getColor(options.getLineColor()); defaultRoi.setStrokeColor(color); if (options.getAlpha() == 0) { defaultRoi.setFillColor(null); } else { color = AWTColors.getColor(options.getFillColor(), options.getAlpha()); defaultRoi.setFillColor(color); } }