JetBrains / lets-plot-kotlin

Grammar of Graphics for Kotlin
https://lets-plot.org/kotlin/
MIT License
434 stars 36 forks source link

Strange message "Graphics2D from BufferedImage lacks BUFFERED_IMAGE hint" during usage lets-plot-batik #79

Closed zaleslaw closed 3 years ago

zaleslaw commented 3 years ago

We are using lets-plot-batik in the KotlinDL project. During running the following example in the PR we got the bunch of messages Graphics2D from BufferedImage lacks BUFFERED_IMAGE hint from batik.

Do we have a chance to set up this hint for the BufferedImage?

This bug is got only on Windows 10 and java 11.0.9. It is not reproduced on Debian for example.

alshan commented 3 years ago

This warning can occur if JRE doesn't report properties of GraphicsDevice properly.

See discussion: https://issues.apache.org/jira/browse/BATIK-461

There is no way for client to setup this hint but you can set system property "org.apache.batik.warn_destination" to false in order to get rid of this warning.

See related code in org.apache.batik.ext.awt.image.GraphicsUtil:

https://github.com/apache/xmlgraphics-batik/blob/f79ce602fa6244d2a7ff45b57b6a0347e883bc37/batik-awt-util/src/main/java/org/apache/batik/ext/awt/image/GraphicsUtil.java#L497

https://github.com/apache/xmlgraphics-batik/blob/f79ce602fa6244d2a7ff45b57b6a0347e883bc37/batik-awt-util/src/main/java/org/apache/batik/ext/awt/image/GraphicsUtil.java#L519