Login  Register

drawString help

Posted by IJperson on Jun 29, 2011; 11:34am
URL: http://imagej.273.s1.nabble.com/Help-needed-with-DNA-band-size-calculation-tp3683989p3683990.html

Hi everybody

Anyone have any ideas why the following doesn't draw any text?

         Font f = new Font("Helvetica", Font.PLAIN, 72);
         iplus2.getStack().getProcessor(image.getCurrentSlice()).setFont(f);
         
iplus2.getStack().getProcessor(image.getCurrentSlice()).setColor(java.awt.Color.cyan);
         
iplus2.getStack().getProcessor(image.getCurrentSlice()).drawString( "x",
x+40, y);

         iplus2.updateAndDraw();

Switching the drawString() command for a putPixel(x, y, pixel) command
works fine...

This is on a RGB image stack.

Many thanks
Andrew