public class ViewportJ2D extends AbstractViewport implements ComponentListener
Constructor and Description |
---|
ViewportJ2D(IPerspective persp,
ClassLoader classloader)
Creates a new Viewport.
|
Modifier and Type | Method and Description |
---|---|
void |
componentHidden(ComponentEvent e) |
void |
componentMoved(ComponentEvent e) |
void |
componentResized(ComponentEvent e) |
void |
componentShown(ComponentEvent e) |
void |
dispose()
Disposes the Viewport.
|
void |
drawPrimitive(DrawableCombiner dc,
Primitive primitive,
Object obj)
Draws a primitive
|
Graphics2D |
getContext() |
AffineTransform |
getDefaultTransform()
Returns the default transform.
|
BufferedImage |
getImage(String path)
Returns an image for texturing
|
AffineTransform |
getImageTransform(int sizeX,
int sizeY)
Sets up the image transform.
|
void |
refresh()
Refreshes the viewport.
|
addViewportListener, getAreaSize, getCanvas, getCanvasSize, getClippingBox, getInvertX, getInvertY, getObjectShift, getPaddedSize, getPerspective, getPixelSize, getPosition, getSize, getSpaceController, getSpaceController, getWorldCoordinates, isShowing, refreshCanvasSize, removeViewportListener, setAreaSize, setBackground, setInvertX, setInvertY, setObjectList, setObjectShift, setPosition, setPostLayers, setPreLayers, setPreserveAspectRation, setSize, setZoomLimit
public ViewportJ2D(IPerspective persp, ClassLoader classloader)
layerObject
- object holding properties for pre/postlayerslibService
- the library servicepublic BufferedImage getImage(String path)
path
- resource path of the imagepublic void refresh()
IViewport
public Graphics2D getContext()
public AffineTransform getDefaultTransform()
public AffineTransform getImageTransform(int sizeX, int sizeY)
sizeX
- image x-sizesizeY
- image y-sizepublic void drawPrimitive(DrawableCombiner dc, Primitive primitive, Object obj)
drawPrimitive
in interface IViewport
dc
- The combiner.primitive
- The primitive.obj
- The object being drawn.public void componentHidden(ComponentEvent e)
componentHidden
in interface ComponentListener
public void componentMoved(ComponentEvent e)
componentMoved
in interface ComponentListener
public void componentResized(ComponentEvent e)
componentResized
in interface ComponentListener
public void componentShown(ComponentEvent e)
componentShown
in interface ComponentListener
Copyright © 2013. All Rights Reserved.