public class FisheyeDistortion extends Distortion
Computes a graphical fisheye distortion of a graph view. This distortion allocates more space to items near the layout anchor and less space to items further away, magnifying space near the anchor and demagnifying distant space in a continuous fashion.
For more details on this form of transformation, see Manojit Sarkar and Marc H. Brown, "Graphical Fisheye Views of Graphs", in Proceedings of CHI'92, Human Factors in Computing Systems, p. 83-91, 1992. Available online at http://citeseer.ist.psu.edu/sarkar92graphical.html.
m_distortSize, m_distortX, m_distortYm_anchor, m_bounds, m_bpts, m_insets, m_margin, m_tmpa, m_tmpbm_groupDEFAULT_STEP_TIME, INFINITY| Constructor and Description |
|---|
FisheyeDistortion()
Create a new FisheyeDistortion with default distortion factor.
|
FisheyeDistortion(double dFactor)
Create a new FisheyeDistortion with the given distortion factor
for use along both the x and y directions.
|
FisheyeDistortion(double xFactor,
double yFactor)
Create a new FisheyeDistortion with the given distortion factors
along the x and y directions.
|
| Modifier and Type | Method and Description |
|---|---|
protected double |
distortSize(java.awt.geom.Rectangle2D bBox,
double x,
double y,
java.awt.geom.Point2D anchor,
java.awt.geom.Rectangle2D bounds)
Returns the scaling factor by which to transform the size of an item.
|
protected double |
distortX(double x,
java.awt.geom.Point2D anchor,
java.awt.geom.Rectangle2D bounds)
Distorts an item's x-coordinate.
|
protected double |
distortY(double y,
java.awt.geom.Point2D anchor,
java.awt.geom.Rectangle2D bounds)
Distorts an item's y-coordinate.
|
double |
getXDistortionFactor()
Returns the distortion factor for the x-axis.
|
double |
getYDistortionFactor()
Returns the distortion factor for the y-axis.
|
void |
setXDistortionFactor(double d)
Sets the distortion factor for the x-axis.
|
void |
setYDistortionFactor(double d)
Sets the distortion factor for the y-axis.
|
correct, isSizeDistorted, run, setSizeDistortedgetLayoutAnchor, getLayoutBounds, setLayoutAnchor, setLayoutBounds, setMargin, setX, setYgetGroup, setGroupgetVisualization, run, setVisualizationaddActivityListener, alwaysRunAfter, cancel, fireActivityCancelled, fireActivityFinished, fireActivityScheduled, fireActivityStarted, fireActivityStepped, getDuration, getNextTime, getPace, getPacingFunction, getStartTime, getStepTime, getStopTime, isEnabled, isRunning, isScheduled, removeActivityListener, run, runAfter, runAt, setDuration, setEnabled, setPacingFunction, setStartTime, setStepTimepublic FisheyeDistortion()
public FisheyeDistortion(double dFactor)
dFactor - the distortion factor (same for both axes)public FisheyeDistortion(double xFactor,
double yFactor)
xFactor - the distortion factor along the x axisyFactor - the distortion factor along the y axispublic double getXDistortionFactor()
public void setXDistortionFactor(double d)
d - The distortion factor to set.public double getYDistortionFactor()
public void setYDistortionFactor(double d)
d - The distortion factor to set.protected double distortX(double x,
java.awt.geom.Point2D anchor,
java.awt.geom.Rectangle2D bounds)
DistortiondistortX in class Distortionx - the undistorted x coordinateanchor - the anchor or focus point of the displaybounds - the layout boundsDistortion.distortX(double, java.awt.geom.Point2D, java.awt.geom.Rectangle2D)protected double distortY(double y,
java.awt.geom.Point2D anchor,
java.awt.geom.Rectangle2D bounds)
DistortiondistortY in class Distortiony - the undistorted y coordinateanchor - the anchor or focus point of the displaybounds - the layout boundsDistortion.distortY(double, java.awt.geom.Point2D, java.awt.geom.Rectangle2D)protected double distortSize(java.awt.geom.Rectangle2D bBox,
double x,
double y,
java.awt.geom.Point2D anchor,
java.awt.geom.Rectangle2D bounds)
DistortiondistortSize in class DistortionbBox - the bounding box of the undistorted itemx - the x-coordinate of the distorted itemy - the y-coordinate of the distorted itemanchor - the anchor or focus point of the displaybounds - the layout boundsDistortion.distortSize(java.awt.geom.Rectangle2D, double, double, java.awt.geom.Point2D, java.awt.geom.Rectangle2D)