roi2.setJustification(justification); roi2.setDrawStringMode(drawStringMode); roi2.setAngle(angle); return roi2;
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.setJustification(justification); roi2.setDrawStringMode(drawStringMode); roi2.setAngle(angle); return roi2;
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); } }
double overlayDrawString(ImagePlus imp) { addDrawingToOverlay(imp); String text = getFirstString(); int x = (int)getNextArg(); int y = (int)getNextArg(); double angle = 0.0; if (interp.nextToken()==',') angle = getLastArg(); else interp.getRightParen(); Font font = this.font; boolean nullFont = font==null; if (nullFont) font = imp.getProcessor().getFont(); TextRoi roi = new TextRoi(text, x, y, font); // use drawString() compatible constructor if (!nullFont && !antialiasedText) roi.setAntialiased(false); roi.setAngle(angle); roi.setJustification(justification); addRoi(imp, roi); return Double.NaN; }
double overlayDrawString(ImagePlus imp) { addDrawingToOverlay(imp); String text = getFirstString(); int x = (int)getNextArg(); int y = (int)getNextArg(); double angle = 0.0; if (interp.nextToken()==',') angle = getLastArg(); else interp.getRightParen(); Font font = this.font; boolean nullFont = font==null; if (nullFont) font = imp.getProcessor().getFont(); TextRoi roi = new TextRoi(text, x, y, font); // use drawString() compatible constructor if (!nullFont && !antialiasedText) roi.setAntialiased(false); roi.setAngle(angle); roi.setJustification(justification); addRoi(imp, roi); return Double.NaN; }
TextRoi.setDefaultAngle(angle); if (textRoi!=null) { textRoi.setAngle(angle); textRoi.setJustification(justification); textRoi.setFillColor(fillColor);
TextRoi.setDefaultAngle(angle); if (textRoi!=null) { textRoi.setAngle(angle); textRoi.setJustification(justification); textRoi.setFillColor(fillColor);
troi.setCurrentFont(font); troi.setAngle(angle); if (justification!=troi.getJustification()) troi.setJustification(justification);
troi.setCurrentFont(font); troi.setAngle(angle); if (justification!=troi.getJustification()) troi.setJustification(justification);