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, setTranslucencyValue
cursorInOut, getDimensions, getDistanceFromBorders, getOwningView, getPortalListener, isVisible, resize, setPortalListener, setVisible, sizeTo
public 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 CameraPortal
public boolean coordInside(int cx, int cy)
Portal
coordInside
in class CameraPortal
cx
- cursor x-coordinate (JPanel coordinates system)cy
- cursor y-coordinate (JPanel coordinates system)public boolean coordInsideBorder(int cx, int cy)
coordInsideBorder
in class CameraPortal
public void move(int dx, int dy)
public void moveTo(int x, int y)
public void updateDimensions()
updateDimensions
in class Portal
public void setBorderWidth(float w)
CameraPortal
setBorderWidth
in class CameraPortal
w
- portal border widthpublic void paint(Graphics2D g2d, int viewWidth, int viewHeight)
paint
in class CameraPortal
Copyright © 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.