Re: How to fill in the background of a text box?
Posted by Rasband, Wayne (NIH/NIMH) [E] on May 11, 2011; 5:17pm
URL: http://imagej.273.s1.nabble.com/How-to-fill-in-the-background-of-a-text-box-tp3684621p3684622.html
On May 11, 2011, at 10:35 AM, xxfire3d wrote:
> Currently the text tool simply embeds the typed out text using the Foreground
> color. Is there an option to fill the entire text box (apart from the text)
> with the Background color?
>
> So, for example, my foreground color is black and background is white and I
> have a blank image of uniform color (say, blue). I want to choose the text
> tool, drag out the text box, type in what I want, hit Ctrl+D and the result
> is a white rectangle filled with black text.
To draw text with a background, create a text selection, run the Edit>Clear command and then press ctrl+d. To do this by pressing a single key (F1), add this macro to the end of the ImageJ/macros/StartupMacros.txt file.
macro "Draw Text with Background [f1]" {
run("Clear", "slice");
run("Draw");
}
-wayne