I have a bit of code in [JSGraphics2D](https://github.com/BobHanson/java2script/blob/498a740761380191658cf127ed77be145de0bad3/sources/net.sf.j2s.java.core/src/swingjs/JSGraphics2D.java#L104) to handle this, but it may not be enough. There have been no reports that I know of regarding this.