das-developers / das2java

The original das2 library. Provides interactive publication-ready 2-D plotting
https://das2.org
GNU Lesser General Public License v3.0
4 stars 0 forks source link

GrannyTextRenderer painters are not properly clipped #92

Open jbfaden opened 9 months ago

jbfaden commented 9 months ago

Annotations with the anchorType plot are clipped within the plot bounds, but I found that any painters used will not be clipped within these bounds. This is because there is a setClip(null) in GrannyTextRenderer: https://github.com/das-developers/das2java/blob/ae056b72b5b397cea249c490b10ec3083b1f4b6e/dasCoreUtil/src/org/das2/util/GrannyTextRenderer.java#L633 .

I experimented with leaving the clip alone, but it causes problems with the image painter, at least. This needs to be studied.

See also https://github.com/das-developers/das2java/issues/47 .