public class RoundCameraPortal extends CameraPortal
borderWidth, halfBorderWidth, stroke| Constructor and Description |
|---|
RoundCameraPortal(int x,
int y,
int w,
int h,
Camera c)
Builds a new portal displaying what is seen through a camera
|
RoundCameraPortal(int x,
int y,
int w,
int h,
Camera c,
float a)
Builds a new portal displaying what is seen through a camera
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
coordInside(int cx,
int cy)
detects whether the given point is inside this portal or not
|
boolean |
coordInsideBorder(int cx,
int cy) |
double[] |
getVisibleRegion()
Get bounds of rectangular region of the VirtualSpace seen through this camera portal.
|
void |
move(int dx,
int dy)
Move the portal inside the view (relative).
|
void |
moveTo(int x,
int y)
Move the portal inside the view (absolute).
|
void |
paint(Graphics2D g2d,
int viewWidth,
int viewHeight) |
void |
setBorderWidth(float w)
Set the border width of the portal (use SetBorder to draw the border)
|
void |
updateDimensions() |
centerOnRegion, centerOnRegion, centerOnRegion, centerOnRegion, getBackgroundColor, getBorder, getBorderWidth, getCamera, getCameras, getGlobalView, getGlobalView, getGlobalView, getGlobalView, getPicker, getSeamlessView, getTranslucencyValue, getVisibleRegion, getVisibleRegion, getVSCoordinates, getVSCoordinates, pick, setBackgroundColor, setBorder, setOwningView, setTranslucencyValuecursorInOut, getDimensions, getDistanceFromBorders, getOwningView, getPortalListener, isVisible, resize, setPortalListener, setVisible, sizeTopublic RoundCameraPortal(int x,
int y,
int w,
int h,
Camera c)
x - top-left horizontal coordinate of portal, in parent's JPanel coordinatesy - top-left vertical coordinate of portal, in parent's JPanel coordinatesw - portal widthh - portal heightc - camera associated with the portalpublic RoundCameraPortal(int x,
int y,
int w,
int h,
Camera c,
float a)
x - top-left horizontal coordinate of portal, in parent's JPanel coordinatesy - top-left vertical coordinate of portal, in parent's JPanel coordinatesw - portal widthh - portal heightc - camera associated with the portala - alpha channel value (translucency). alpha ranges between 0.0 (fully transparent) and 1.0 (fully opaque)public double[] getVisibleRegion()
getVisibleRegion in class CameraPortalpublic boolean coordInside(int cx,
int cy)
PortalcoordInside in class CameraPortalcx - cursor x-coordinate (JPanel coordinates system)cy - cursor y-coordinate (JPanel coordinates system)public boolean coordInsideBorder(int cx,
int cy)
coordInsideBorder in class CameraPortalpublic void move(int dx,
int dy)
public void moveTo(int x,
int y)
public void updateDimensions()
updateDimensions in class Portalpublic void setBorderWidth(float w)
CameraPortalsetBorderWidth in class CameraPortalw - portal border widthpublic void paint(Graphics2D g2d, int viewWidth, int viewHeight)
paint in class CameraPortalCopyright © 2000-2002 Xerox Corporation. All Rights Reserved
Copyright © 2003 World Wide Web Consortium. All Rights Reserved
Copyright © 2004-2015 INRIA. All Rights Reserved
Licensed under the GNU LGPL. For full terms see the file COPYING.