Package org.jzy3d.plot3d.rendering.view
Class OverlayUtils
java.lang.Object
org.jzy3d.plot3d.rendering.view.OverlayUtils
Helps understanding how overlay is actually performed by JOGL2.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected IntegerCoord2d
canvasToViewport
(MouseEvent e, Rectangle viewport) Needed when wishing to adapt a coordinate relative to the canvas to the viewport frame.protected IntegerCoord2d
canvasToViewport
(IntegerCoord2d c, Rectangle viewport) protected PolygonArray
canvasToViewport
(PolygonArray p, Rectangle viewport) protected IntegerCoord2d
canvasToViewport
(Rectangle viewport, IntegerCoord2d c) static void
drawCanvasAndViewportDiagonalComparison
(Chart chart, Graphics2D g2d) 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).static void
drawDiagonal
(Graphics2D g2d, Color c, int wmax, int hmax, boolean sysout) Diagonal made of points from (0,0) to (wmax, hmax).static void
drawPixel
(Graphics2D g2d, Color c, int x, int y) static void
drawPixel
(Graphics2D g2d, Color c, int x, int y, int width) void
drawSelection
(Graphics2D g2d, IntegerCoord2d in, int width, int height) static void
drawText
(Graphics2D g2d, Color c, int x, int y, String txt) protected void
projectionStat
(PolygonArray[][] array) protected IntegerCoord2d
viewportToCanvas
(Chart chart, IntegerCoord2d input, Rectangle viewport) Needed when wishing to display a coordinate relative to the viewport.
-
Constructor Details
-
OverlayUtils
public OverlayUtils()
-
-
Method Details
-
drawSelection
-
drawCanvasAndViewportDiagonalComparison
-
drawPixel
-
drawPixel
-
drawText
-
drawChartBorder
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
Diagonal made of points from (0,0) to (wmax, hmax). -
canvasToViewport
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
-
canvasToViewport
-
canvasToViewport
-
viewportToCanvas
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
-