Package org.jzy3d.plot3d.rendering.view
Class AWTImageViewport
java.lang.Object
org.jzy3d.plot3d.rendering.view.AbstractViewportManager
org.jzy3d.plot3d.rendering.view.AWTImageViewport
- All Implemented Interfaces:
IImageViewport
- Direct Known Subclasses:
AWTLegend
A
AWTImageViewport
allows displaying a 2d Image
within an OpenGL viewport.- Author:
- Martin Pernollet
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BufferedImage
protected ByteBuffer
protected int
protected int
protected Margin
protected Coord2d
Fields inherited from class org.jzy3d.plot3d.rendering.view.AbstractViewportManager
applyWindowsHiDPIWorkaround, lastViewPort, mode, screenBottom, screenGridDisplayed, screenHeight, screenLeft, screenSquaredDim, screenWidth, screenXOffset, screenYOffset
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AWTImageViewport.ImageLayout
computeLayout
(IPainter painter) Compute the position of the image in this viewport based on the image dimensions, the viewport dimensions and the margin.getImage()
Return the image rendered by theAWTImageViewport
Return the minimum size for this graphic.void
Renders the picture into the window, according to the viewport settings.protected void
renderImage
(IPainter painter) void
setImage
(BufferedImage image) void
setImage
(BufferedImage image, int width, int height) Set theImage
that will be displayed by the layer.void
setImage
(BufferedImage image, int width, int height, ByteBuffer buffer) void
void
updatePixelScale
(Coord2d pixelScale) Update internal pixel scale knowledge.Methods inherited from class org.jzy3d.plot3d.rendering.view.AbstractViewportManager
apply_WindowsHiDPI_Workaround, apply_WindowsHiDPI_Workaround, applyViewport, applyViewportRectangle, applyViewportSquared, getLastViewPort, getRectangle, getScreenBottom, getScreenHeight, getScreenLeft, getScreenWidth, getScreenXOffset, getScreenYOffset, getSliceWidth, getViewPort, getViewportMode, getWindowsHiDPIScale_Workaround, isApplyWindowsHiDPIWorkaround, isScreenGridDisplayed, renderSubScreenGrid, setApplyWindowsHiDPIWorkaround, setScreenGridDisplayed, setScreenXOffset, setScreenYOffset, setViewPort, setViewPort, setViewPort, setViewportMode
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jzy3d.plot3d.rendering.view.IImageViewport
getLastViewPort, getSliceWidth, getViewportMode, setViewPort, setViewPort, setViewPort, setViewportMode
-
Field Details
-
imageData
-
image
-
imageHeight
protected int imageHeight -
imageWidth
protected int imageWidth -
margin
-
pixelScale
-
-
Constructor Details
-
AWTImageViewport
public AWTImageViewport()
-
-
Method Details
-
render
Description copied from interface:IImageViewport
Renders the picture into the window, according to the viewport settings. If the picture is bigger than the viewport, it is simply centered in it, otherwise, it is scaled in order to fit into the viewport.- Specified by:
render
in interfaceIImageViewport
-
renderImage
-
computeLayout
Compute the position of the image in this viewport based on the image dimensions, the viewport dimensions and the margin. -
updatePixelScale
Update internal pixel scale knowledge. Called by render loop and provided by painter's view. May be overrided to update the image.- Specified by:
updatePixelScale
in interfaceIImageViewport
-
getPixelScale
- Specified by:
getPixelScale
in interfaceIImageViewport
-
setImage
Set theImage
that will be displayed by the layer.- Parameters:
image
-
-
setImage
-
setImage
-
getImage
Return the image rendered by theAWTImageViewport
-
getMinimumDimension
Return the minimum size for this graphic.- Specified by:
getMinimumDimension
in interfaceIImageViewport
-
getMargin
-
setMargin
-