@Equality public interface Captioner
It might be better to rework this interface so that the reference
position is the origin of the bounding box rather than the start of
the baseline which may have a descender. That would make the calculations
easier - it's easy to get confused about the origins and height.
It would also mean this interface could just return an
Icon
.
Modifier and Type | Method and Description |
---|---|
void |
drawCaption(Caption label,
Graphics g)
Draws a caption such that the left end of the text baseline is at
the origin of the supplied graphics context.
|
Rectangle |
getCaptionBounds(Caption label)
Returns a bounding box for the caption drawn by a corresponding call
to
drawCaption(uk.ac.starlink.ttools.plot2.Caption, java.awt.Graphics) . |
int |
getPad()
Returns a suitable padding value for separating captions from
the reference position or other graphical elements.
|
void drawCaption(Caption label, Graphics g)
label
- caption textg
- graphics contextRectangle getCaptionBounds(Caption label)
drawCaption(uk.ac.starlink.ttools.plot2.Caption, java.awt.Graphics)
.label
- caption textint getPad()
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.