roi2 = new TextRoi(r.x, r.y, r.width, r.height, new String(text), font); roi2.setStrokeColor(roi.getStrokeColor()); roi2.setFillColor(roi.getFillColor()); roi2.setName(getRoiName()); roi2.setJustification(justification);
public TextRoi(int x, int y, ImagePlus imp) { super(x, y, imp); ImageCanvas ic = imp.getCanvas(); double mag = getMagnification(); if (mag>1.0) mag = 1.0; if (size<(12/mag)) size = (int)(12/mag); if (firstTime) { theText[0] = line1; theText[1] = line2; theText[2] = line3; firstTime = false; } else theText[0] = line1a; if (previousRoi!=null && (previousRoi instanceof TextRoi)) { firstMouseUp = false; previousRoi = null; } instanceFont = new Font(name, style, size); justification = globalJustification; setStrokeColor(Toolbar.getForegroundColor()); if (WindowManager.getWindow("Fonts")!=null) { setFillColor(defaultFillColor); setAngle(defaultAngle); } }
roi2 = new TextRoi(r.x, r.y, r.width, r.height, new String(text), font); roi2.setStrokeColor(roi.getStrokeColor()); roi2.setFillColor(roi.getFillColor()); roi2.setName(getRoiName()); roi2.setJustification(justification);
public TextRoi(int x, int y, ImagePlus imp) { super(x, y, imp); ImageCanvas ic = imp.getCanvas(); double mag = getMagnification(); if (mag>1.0) mag = 1.0; if (size<(12/mag)) size = (int)(12/mag); if (firstTime) { theText[0] = line1; theText[1] = line2; theText[2] = line3; firstTime = false; } else theText[0] = line1a; if (previousRoi!=null && (previousRoi instanceof TextRoi)) { firstMouseUp = false; previousRoi = null; } instanceFont = new Font(name, style, size); justification = globalJustification; setStrokeColor(Toolbar.getForegroundColor()); if (WindowManager.getWindow("Fonts")!=null) { setFillColor(defaultFillColor); setAngle(defaultAngle); } }
textRoi.setAngle(angle); textRoi.setJustification(justification); textRoi.setFillColor(fillColor); textRoi.setAntialiased(antialiased);
textRoi.setAngle(angle); textRoi.setJustification(justification); textRoi.setFillColor(fillColor); textRoi.setAntialiased(antialiased);