Class OverlayUtils

java.lang.Object
org.jzy3d.plot3d.rendering.view.OverlayUtils

public class OverlayUtils extends Object
Helps understanding how overlay is actually performed by JOGL2.
  • Constructor Details

    • OverlayUtils

      public OverlayUtils()
  • Method Details

    • drawSelection

      public void drawSelection(Graphics2D g2d, IntegerCoord2d in, int width, int height)
    • drawCanvasAndViewportDiagonalComparison

      public static void drawCanvasAndViewportDiagonalComparison(Chart chart, Graphics2D g2d)
    • drawPixel

      public static void drawPixel(Graphics2D g2d, Color c, int x, int y, int width)
    • drawPixel

      public static void drawPixel(Graphics2D g2d, Color c, int x, int y)
    • drawText

      public static void drawText(Graphics2D g2d, Color c, int x, int y, String txt)
    • drawChartBorder

      public static void drawChartBorder(Graphics2D g2d, Color c, Chart chart)
      This shows a strange behaviour in the Overlay: when trying to draw a rectangle based on the CANVAS size (i.e. the window size), the border occupies the CHART (i.e. its actual viewport).
    • drawDiagonal

      public static void drawDiagonal(Graphics2D g2d, Color c, int wmax, int hmax, boolean sysout)
      Diagonal made of points from (0,0) to (wmax, hmax).
    • canvasToViewport

      protected IntegerCoord2d canvasToViewport(MouseEvent e, Rectangle viewport)
      Needed when wishing to adapt a coordinate relative to the canvas to the viewport frame. If the mouse does not stand on top of the viewport (meaning the viewport is smaller than the canvas), then the output coordinate is (-1,-1).
    • canvasToViewport

      protected IntegerCoord2d canvasToViewport(IntegerCoord2d c, Rectangle viewport)
    • canvasToViewport

      protected IntegerCoord2d canvasToViewport(Rectangle viewport, IntegerCoord2d c)
    • canvasToViewport

      protected PolygonArray canvasToViewport(PolygonArray p, Rectangle viewport)
    • viewportToCanvas

      protected IntegerCoord2d viewportToCanvas(Chart chart, IntegerCoord2d input, Rectangle viewport)
      Needed when wishing to display a coordinate relative to the viewport. Expect a coordinate in viewport frame to be converted to the canvas frame, since Overlay expect coordinates in the canvas frame and then stretch it to be displayed in viewport frame!
    • projectionStat

      protected void projectionStat(PolygonArray[][] array)