Class AWTNativeViewOverlay

    • Field Detail

      • LOGGER

        protected static org.apache.log4j.Logger LOGGER
      • overlay

        protected com.jogamp.opengl.util.awt.Overlay overlay
      • overlayBackground

        protected Color overlayBackground
    • Constructor Detail

      • AWTNativeViewOverlay

        public AWTNativeViewOverlay()
    • Method Detail

      • render

        public void render​(View view,
                           ViewportConfiguration viewport,
                           IPainter painter)
        Renders all provided Tooltips and AWTRenderer2ds on top of the scene. Due to the behaviour of the Overlay implementation, Java2d geometries must be drawn relative to the Chart's IScreenCanvas, BUT will then be stretched to fit in the Camera's viewport. This bug is very important to consider, since the Camera's viewport may not occupy the full IScreenCanvas. Indeed, when View is not maximized (like the default behaviour), the viewport remains square and centered in the canvas, meaning the Overlay won't cover the full canvas area. In other words, the following piece of code draws a border around the View, and not around the complete chart canvas, although queried to occupy chart canvas dimensions: g2d.drawRect(1, 1, chart.getCanvas().getRendererWidth()-2, chart.getCanvas().getRendererHeight()-2); renderOverlay() must be called while the OpenGL2 context for the drawable is current, and after the OpenGL2 scene has been rendered.
        Specified by:
        render in interface IViewOverlay