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 BufferedImageprotected ByteBufferprotected intprotected intprotected Marginprotected Coord2dFields 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.ImageLayoutcomputeLayout(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 theAWTImageViewportReturn the minimum size for this graphic.voidRenders the picture into the window, according to the viewport settings.protected voidrenderImage(IPainter painter) voidsetImage(BufferedImage image) voidsetImage(BufferedImage image, int width, int height) Set theImagethat will be displayed by the layer.voidsetImage(BufferedImage image, int width, int height, ByteBuffer buffer) voidvoidupdatePixelScale(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, setViewportModeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:IImageViewportRenders 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:
renderin 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:
updatePixelScalein interfaceIImageViewport
-
getPixelScale
- Specified by:
getPixelScalein interfaceIImageViewport
-
setImage
Set theImagethat 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:
getMinimumDimensionin interfaceIImageViewport
-
getMargin
-
setMargin
-