On Jun 30, 2014, at 11:46 AM, Neil Fazel wrote:
> Is there a way to insert a new line in a text overlay? For example:
>
> Overlay.drawString("Al\n75um", x, y);
>
> I'm doing this on Mac and I find that newline characters are ignored.
The Overlay.drawString() macro function in the latest ImageJ daily build (1.49d5) no longer ignores newline characters. Or work around the problem by using makeText() and run("Add Selection..."), as in this example:
newImage("Untitled", "8-bit black", 500, 500, 1);
setForegroundColor(255, 255, 0);
setFont("SansSerif", 28, " antialiased");
text = "These three lines of\ntext have been added\nto an overlay.";
makeText(text, 100, 100)
run("Add Selection...");
run("Select None");
-wayne
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html