On Tue, 20 Apr 2004, Tim Jenness wrote:
> Now that AST supports sub- and super-scripting, some tools are being
> caught off guard.
>
> I have a NDF label (generated by specx2ndf) which is:
>
> T%s60+%v30+A%^50+%<20+*%+ corrected antenna temperature
>
> This gets plotted fine in splat and linplot etc but tools such as treeview
> and splat (when it is showing the text of the label, not plotting it) show
> the above string.
>
> Is there an easy way to ask AST for the label with the escape codes
> stripped for text display?
You can ask AST to strip these out for all non-astPlot calls, that's what
the astEscapes function provides for (and I believe is the default).
What we really need is a renderer/editor component that displays these
sequences correctly and provides a simple interface for modifying the
properties of the text. Had a go at that but AST escape sequences are too
flexible (the fractional positioning is hard to reproduce) and the Java2D
classes for doing this sort of thing are badly broken (in different ways
for different versions), so I gave up.
Peter.
|