public void setLineWidth(int width) { record("setLineWidth", new Integer(width), int.class); proc.setLineWidth(width); }
public void setLineWidth(int width) { record("setLineWidth", new Integer(width), int.class); proc.setLineWidth(width); }
ImageProcessor getProcessor() { if (defaultIP==null) { defaultIP = getImage().getProcessor(); if (lineWidthSet) defaultIP.setLineWidth(lineWidth); } return defaultIP; }
public void drawPixels(ImageProcessor ip) { ip.setLineWidth(Analyzer.markWidth); for (int i=0; i<nPoints; i++) { ip.moveTo(x+(int)xpf[i], y+(int)ypf[i]); ip.lineTo(x+(int)xpf[i], y+(int)ypf[i]); } }
ImageProcessor getProcessor() { if (defaultIP==null) { defaultIP = getImage().getProcessor(); if (lineWidthSet) defaultIP.setLineWidth(lineWidth); } return defaultIP; }
public void drawPixels(ImageProcessor ip) { ip.setLineWidth(Analyzer.markWidth); for (int i=0; i<nPoints; i++) { ip.moveTo(x+(int)xpf[i], y+(int)ypf[i]); ip.lineTo(x+(int)xpf[i], y+(int)ypf[i]); } }
private void setLineWidth(int width) { if (overlayPath!=null && width!=lineWidth) addDrawingToOverlay(getImage()); lineWidth = width; getProcessor().setLineWidth(width); lineWidthSet = true; }
/** Draws an outline of this OvalRoi on the image. */ public void drawPixels(ImageProcessor ip) { Polygon p = getPolygon(); if (p.npoints>0) { int saveWidth = ip.getLineWidth(); if (getStrokeWidth()>1f) ip.setLineWidth((int)Math.round(getStrokeWidth())); ip.drawPolygon(p); ip.setLineWidth(saveWidth); } if (Line.getWidth()>1 || getStrokeWidth()>1) updateFullWindow = true; }
private void setLineWidth(int width) { if (overlayPath!=null && width!=lineWidth) addDrawingToOverlay(getImage()); lineWidth = width; getProcessor().setLineWidth(width); lineWidthSet = true; }
/** Draws an outline of this OvalRoi on the image. */ public void drawPixels(ImageProcessor ip) { Polygon p = getPolygon(); if (p.npoints>0) { int saveWidth = ip.getLineWidth(); if (getStrokeWidth()>1f) ip.setLineWidth((int)Math.round(getStrokeWidth())); ip.drawPolygon(p); ip.setLineWidth(saveWidth); } if (Line.getWidth()>1 || getStrokeWidth()>1) updateFullWindow = true; }
final static public void drawLocalPoints( final ImageProcessor ip, final Collection< ? extends Point > points, final Color color, final int width, final Rectangle srcRect, final double magnification ) { final int oldLineWidth = ip.getLineWidth(); ip.setColor( color ); ip.setLineWidth( width ); for ( final Point p : points ) { final double[] l = p.getL(); final double x = ( l[ 0 ] + srcRect.x ) * magnification; final double y = ( l[ 1 ] + srcRect.y ) * magnification; ip.drawDot( Util.round( x ), Util.round( y ) ); } ip.setLineWidth( oldLineWidth ); }
final static public void drawWorldPoints( final ImageProcessor ip, final Collection< ? extends Point > points, final Color color, final int width, final Rectangle srcRect, final double magnification ) { final int oldLineWidth = ip.getLineWidth(); ip.setColor( color ); ip.setLineWidth( width ); for ( final Point p : points ) { final double[] w = p.getW(); final double x = ( w[ 0 ] + srcRect.x ) * magnification; final double y = ( w[ 1 ] + srcRect.y ) * magnification; ip.drawDot( Util.round( x ), Util.round( y ) ); } ip.setLineWidth( oldLineWidth ); }
final static public void drawWorldPoints( final ImageProcessor ip, final Collection< ? extends Point > points, final Color color, final int width, final Rectangle srcRect, final double magnification ) { final int oldLineWidth = ip.getLineWidth(); ip.setColor( color ); ip.setLineWidth( width ); for ( final Point p : points ) { final double[] w = p.getW(); final double x = ( w[ 0 ] + srcRect.x ) * magnification; final double y = ( w[ 1 ] + srcRect.y ) * magnification; ip.drawDot( Util.round( x ), Util.round( y ) ); } ip.setLineWidth( oldLineWidth ); }
void drawBorder(final ImageProcessor montage, final int x, final int y, final int width, final int height, final int borderWidth) { montage.setLineWidth(borderWidth); montage.moveTo(x, y); montage.lineTo(x + width, y); montage.lineTo(x + width, y + height); montage.lineTo(x, y + height); montage.lineTo(x, y); }
public void drawPoint(int i, int c) { int xp = (int)(factor*(x[i]-xmin)) + INDENT; int yp = h + INDENT - (int)(factor*(y[i]-ymin)) ; ip.setColor(c); ip.setFont(FONT); ip.drawLine(xp-3, yp-3, xp+3, yp+3); ip.setLineWidth(2); ip.drawLine(xp-3, yp+3, xp+3, yp-3); if(drawLabels) ip.drawString(labels[i], xp+4, yp+4); }
public void drawPixels(ImageProcessor ip) { ShapeRoi shapeRoi = getShapeRoi(); ShapeRoi shapeRoi2 = null; if (doubleHeaded) { flipEnds(); shapeRoi2 = getShapeRoi(); flipEnds(); } if (outline) { int lineWidth = ip.getLineWidth(); ip.setLineWidth((int)Math.round(getOutlineWidth())); shapeRoi.drawPixels(ip); if (doubleHeaded) shapeRoi2.drawPixels(ip); ip.setLineWidth(lineWidth); } else { ip.fill(shapeRoi); if (doubleHeaded) ip.fill(shapeRoi2); } }
/** Draws the selection outline on the specified ImageProcessor. @see ij.process.ImageProcessor#setColor @see ij.process.ImageProcessor#setLineWidth */ public void drawPixels(ImageProcessor ip) { endPaste(); int saveWidth = ip.getLineWidth(); if (getStrokeWidth()>1f) ip.setLineWidth((int)Math.round(getStrokeWidth())); if (cornerDiameter>0) drawRoundedRect(ip); else { if (ip.getLineWidth()==1) ip.drawRect(x, y, width+1, height+1); else ip.drawRect(x, y, width, height); } ip.setLineWidth(saveWidth); if (Line.getWidth()>1 || getStrokeWidth()>1) updateFullWindow = true; }
public void drawPixels(ImageProcessor ip) { ShapeRoi shapeRoi = getShapeRoi(); ShapeRoi shapeRoi2 = null; if (doubleHeaded) { flipEnds(); shapeRoi2 = getShapeRoi(); flipEnds(); } if (outline) { int lineWidth = ip.getLineWidth(); ip.setLineWidth((int)Math.round(getOutlineWidth())); shapeRoi.drawPixels(ip); if (doubleHeaded) shapeRoi2.drawPixels(ip); ip.setLineWidth(lineWidth); } else { ip.fill(shapeRoi); if (doubleHeaded) ip.fill(shapeRoi2); } }
void lineWidth() { int width = (int)IJ.getNumber("Line Width:", Line.getWidth()); if (width==IJ.CANCELED) return; Line.setWidth(width); LineWidthAdjuster.update(); ImagePlus imp = WindowManager.getCurrentImage(); if (imp!=null && imp.isProcessor()) { ImageProcessor ip = imp.getProcessor(); ip.setLineWidth(Line.getWidth()); Roi roi = imp.getRoi(); if (roi!=null && roi.isLine()) imp.draw(); } }
void lineWidth() { int width = (int)IJ.getNumber("Line Width:", Line.getWidth()); if (width==IJ.CANCELED) return; Line.setWidth(width); LineWidthAdjuster.update(); ImagePlus imp = WindowManager.getCurrentImage(); if (imp!=null && imp.isProcessor()) { ImageProcessor ip = imp.getProcessor(); ip.setLineWidth(Line.getWidth()); Roi roi = imp.getRoi(); if (roi!=null && roi.isLine()) imp.draw(); } }