Overlay.drawString changed behaviour in latest 1.52j?

Hey all,

I’ve been swapping b/w running some macros on 1.52i and 1.52 j that are call

Overlay.drawString(…)

It seems that somewhere b/w those versions drawString flipped from taking the X,Y coord you specify from the top LH corner of the text box the the bottom LH corner.

I think previous versions used top LH corner (I check the doc again and it’s not clear) - but at least it looks like it’s swapped which corner it’s using

I am not aware of any changes in the behavior of Overlay.drawString(). The output of this test macro is the same in ImageJ 1.52j as it is in earlier versions of ImageJ.

  newImage("Untitled", "8-bit black", 400, 200, 1);
  text = "ImageJ "+getVersion;
  x = getWidth/2;
  y = getHeight/2;
  setColor("white");
  Overlay.drawLine(0, y, getWidth, y);
  Overlay.drawLine(x, 0, x, getHeight);
  setFont("SansSerif", 16, "antialiased");
  Overlay.drawString(text, x, y);
  Overlay.show;

Screenshot

Thanks for checking Wayne!

I’m not specific on which versions I saw this in, but I’ll try and go back and check

richard