Re: Multiline ImageWindow Subtitle

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Multiline ImageWindow Subtitle

Wayne Rasband
 > <JavaScript example using TextRoi and  createDisplayList>
 >
 > Hi list,
 >
 > this is great stuff, nevertheles some questions/comments:
 >
 > 1) Can I have a TextRoi with an (optional) opaque
 > background? Otherwise IMHO the text is very difficult to
 > read (also in the "official" TextOverlay.js example)

You can set the background color of a TextRoi using the  
setBackgroundColor() method, which was added in the 1.43h daily build.  
I updated the JavaScript text overlay example at

     http://rsb.info.nih.gov/ij/macros/js/TextOverlay.js

to use the method.

 > 2) Is there more info about the createDisplayList method
 > (besides the sourcecode) ? I imagine that it could be used
 > to create all kinds of fancy nondistructive overlays!

Here are some example plugins that use display lists to draw  
non-destructive graphic overlays:

     http://rsb.info.nih.gov/ij/plugins/grid.html
     http://rsb.info.nih.gov/ij/plugins/concentric-circles.html
     http://rsb.info.nih.gov/ij/plugins/graphic-overlay.html
     
http://rsb.info.nih.gov/ij/plugins/download/ 
MultiColor_Graphic_Overlay.java

 > 3) With all the great features that are added constantly
 > added to the ImageJ core, it seems that the docs are
 > gettinng more and more behind, createDisplayList isnĀ“t even
 > found in the latest API on the website!? (also not the more
 > advanced setfont() methods od TextRoi that might answer 1)

I think what you are looking for is the ImageCanvas.setDisplayList()  
method. I updated the ImageJ API documentation at

    http://rsb.info.nih.gov/ij/developer/api/

to v1.43h.

-wayne