|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jzy3d.plot3d.rendering.view.ImageViewport
public class ImageViewport
A ImageViewport
allows displaying a 2d Image
within an OpenGL2 viewport.
Field Summary | |
---|---|
protected int |
imageHeight
|
protected Image |
imageObj
|
protected int |
imageWidth
|
protected ViewPort |
lastViewPort
|
protected float |
ratioHeight
|
protected float |
ratioWidth
|
protected boolean |
screenGridDisplayed
|
protected int |
screenHeight
|
protected int |
screenLeft
|
protected int |
screenRight
|
protected int |
screenSquaredDim
|
protected int |
screenWidth
|
protected int |
screenXOffset
|
protected int |
screenYOffset
|
protected boolean |
stretchToFill
|
Constructor Summary | |
---|---|
ImageViewport()
|
Method Summary | |
---|---|
protected void |
applyViewPort(javax.media.opengl.GL2 gl,
javax.media.opengl.glu.GLU glu)
Apply the GL viewport according to the settings given to setViewPort. |
Image |
getImage()
Return the image rendered by the ImageViewport |
ViewPort |
getLastViewPort()
|
Dimension |
getMinimumSize()
Return the minimum size for this graphic. |
Dimension |
getPreferedSize()
Return the prefered size for this graphic. |
Rectangle |
getRectangle()
Returns the (x,y) offset that was applied to make this AbstractViewport stand in the appropriate canvas part. |
boolean |
getStretchToFill()
|
void |
render(javax.media.opengl.GL2 gl,
javax.media.opengl.glu.GLU glu)
Renders the picture into the window, according to the viewport settings. |
void |
setImage(Image image)
|
void |
setImage(Image image,
int width,
int height)
Set the Image that will be displayed by the layer. |
void |
setImage(Image image,
int width,
int height,
ByteBuffer buffer)
|
void |
setScreenGridDisplayed(boolean status)
Set the status of the screen grid. |
void |
setStretchToFill(boolean status)
Set the status of the stretching mode (activated or not). |
void |
setViewPort(int width,
int height)
Set the view port (size of the renderer). |
void |
setViewPort(int width,
int height,
float left,
float right)
Set the view port (size of the renderer). |
void |
setViewPort(ViewPort viewport)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Image imageObj
protected int imageHeight
protected int imageWidth
protected ViewPort lastViewPort
protected int screenLeft
protected int screenRight
protected int screenXOffset
protected int screenYOffset
protected int screenWidth
protected int screenHeight
protected int screenSquaredDim
protected boolean screenGridDisplayed
protected boolean stretchToFill
protected float ratioWidth
protected float ratioHeight
Constructor Detail |
---|
public ImageViewport()
Method Detail |
---|
public void render(javax.media.opengl.GL2 gl, javax.media.opengl.glu.GLU glu)
gl
- glu
- public void setImage(Image image, int width, int height)
Image
that will be displayed by the layer.
image
- public void setImage(Image image, int width, int height, ByteBuffer buffer)
public void setImage(Image image)
public Image getImage()
ImageViewport
public Dimension getMinimumSize()
public Dimension getPreferedSize()
public void setStretchToFill(boolean status)
status
- public boolean getStretchToFill()
public void setViewPort(int width, int height)
width
- the width of the target window.height
- the height of the target window.public void setViewPort(int width, int height, float left, float right)
width
- the width of the target window.height
- the height of the target window.left
- the width's ratio where this subscreen starts in the target window.right
- the width's ratio where this subscreen stops in the target window.
an
- IllegalArgumentException if right is not greater than left.public void setViewPort(ViewPort viewport)
public ViewPort getLastViewPort()
protected void applyViewPort(javax.media.opengl.GL2 gl, javax.media.opengl.glu.GLU glu)
applyViewPort
, one can query the offset that was
applied to the viewport relative to the canvas. Indeed, when the stretchToFill
option is disabled, the viewport is computed so that the content appears in
a squared subpart of the canvas.
gl
- glu
- public Rectangle getRectangle()
AbstractViewport
stand in the appropriate canvas part.
and the actual width and height of the viewport.
Only relevant after a call to applyViewPort
.
public void setScreenGridDisplayed(boolean status)
status
- the grid is displayed if status is set to true
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |