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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected IntegerCoord2dcanvasToViewport(MouseEvent e, Rectangle viewport) Needed when wishing to adapt a coordinate relative to the canvas to the viewport frame.protected IntegerCoord2dcanvasToViewport(IntegerCoord2d c, Rectangle viewport) protected PolygonArraycanvasToViewport(PolygonArray p, Rectangle viewport) protected IntegerCoord2dcanvasToViewport(Rectangle viewport, IntegerCoord2d c) static voiddrawCanvasAndViewportDiagonalComparison(Chart chart, Graphics2D g2d) static voiddrawChartBorder(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 voiddrawDiagonal(Graphics2D g2d, Color c, int wmax, int hmax, boolean sysout) Diagonal made of points from (0,0) to (wmax, hmax).static voiddrawPixel(Graphics2D g2d, Color c, int x, int y) static voiddrawPixel(Graphics2D g2d, Color c, int x, int y, int width) voiddrawSelection(Graphics2D g2d, IntegerCoord2d in, int width, int height) static voiddrawText(Graphics2D g2d, Color c, int x, int y, String txt) protected voidprojectionStat(PolygonArray[][] array) protected IntegerCoord2dviewportToCanvas(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
-