|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object prefuse.activity.Activity prefuse.action.Action prefuse.action.GroupAction prefuse.action.layout.Layout prefuse.action.distortion.Distortion prefuse.action.distortion.BifocalDistortion
public class BifocalDistortion
Computes a bifocal distortion of space, magnifying a focus region of space and uniformly demagnifying the rest of the space. The affect is akin to passing a magnifying glass over the data.
For more details on this form of transformation, see Y. K. Leung and M. D. Apperley, "A Review and Taxonomy of Distortion-Oriented Presentation Techniques", in Transactions of Computer-Human Interaction (TOCHI), 1(2): 126-160 (1994). Available online at portal.acm.org/citation.cfm?id=180173&dl=ACM.
Field Summary |
---|
Fields inherited from class prefuse.action.distortion.Distortion |
---|
m_distortSize, m_distortX, m_distortY |
Fields inherited from class prefuse.action.layout.Layout |
---|
m_anchor, m_bounds, m_bpts, m_insets, m_margin, m_tmpa, m_tmpb |
Fields inherited from class prefuse.action.GroupAction |
---|
m_group |
Fields inherited from class prefuse.action.Action |
---|
m_vis |
Fields inherited from class prefuse.activity.Activity |
---|
DEFAULT_STEP_TIME, INFINITY |
Constructor Summary | |
---|---|
BifocalDistortion()
Create a new BifocalDistortion with default range and magnification. |
|
BifocalDistortion(double range,
double mag)
Create a new BifocalDistortion with the specified range and magnification. |
|
BifocalDistortion(double xrange,
double xmag,
double yrange,
double ymag)
Create a new BifocalDistortion with the specified range and magnification along both axes. |
Method Summary | |
---|---|
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 a,
java.awt.geom.Rectangle2D b)
Distorts an item's x-coordinate. |
protected double |
distortY(double y,
java.awt.geom.Point2D a,
java.awt.geom.Rectangle2D b)
Distorts an item's y-coordinate. |
double |
getXMagnification()
Returns the magnification factor for the x-axis. |
double |
getXRange()
Returns the range of the focal area along the x-axis. |
double |
getYMagnification()
Returns the magnification factor for the y-axis. |
double |
getYRange()
Returns the range of the focal area along the y-axis. |
void |
setXMagnification(double mx)
Sets the magnification factor for the x-axis. |
void |
setXRange(double rx)
Sets the range of the focal area along the x-axis. |
void |
setYMagnification(double my)
Sets the magnification factor for the y-axis. |
void |
setYRange(double ry)
Sets the range of the focal area along the y-axis. |
Methods inherited from class prefuse.action.distortion.Distortion |
---|
correct, isSizeDistorted, run, setSizeDistorted |
Methods inherited from class prefuse.action.layout.Layout |
---|
getLayoutAnchor, getLayoutBounds, setLayoutAnchor, setLayoutBounds, setMargin, setX, setY |
Methods inherited from class prefuse.action.GroupAction |
---|
getGroup, setGroup |
Methods inherited from class prefuse.action.Action |
---|
getVisualization, run, setVisualization |
Methods inherited from class prefuse.activity.Activity |
---|
addActivityListener, 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, setStepTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BifocalDistortion()
public BifocalDistortion(double range, double mag)
Create a new BifocalDistortion with the specified range and magnification. The same range and magnification is used for both axes.
NOTE:if the range value times the magnification value is greater than 1, the resulting distortion can exceed the display bounds.
range
- the range around the focus that should be magnified. This
specifies the size of the magnified focus region, and should be in the
range of 0 to 1, 0 being no magnification range and 1 being the whole
display.mag
- how much magnification should be used in the focal areapublic BifocalDistortion(double xrange, double xmag, double yrange, double ymag)
Create a new BifocalDistortion with the specified range and magnification along both axes.
NOTE:if the range value times the magnification value is greater than 1, the resulting distortion can exceed the display bounds.
xrange
- the range around the focus that should be magnified along
the x direction. This specifies the horizontal size of the magnified
focus region, and should be a value between 0 and 1, 0 indicating no
focus region and 1 indicating the whole display.xmag
- how much magnification along the x direction should be used
in the focal areayrange
- the range around the focus that should be magnified along
the y direction. This specifies the vertical size of the magnified
focus region, and should be a value between 0 and 1, 0 indicating no
focus region and 1 indicating the whole display.ymag
- how much magnification along the y direction should be used
in the focal areaMethod Detail |
---|
protected double distortX(double x, java.awt.geom.Point2D a, java.awt.geom.Rectangle2D b)
Distortion
distortX
in class Distortion
x
- the undistorted x coordinatea
- the anchor or focus point of the displayb
- the layout bounds
Distortion.distortX(double, java.awt.geom.Point2D, java.awt.geom.Rectangle2D)
protected double distortY(double y, java.awt.geom.Point2D a, java.awt.geom.Rectangle2D b)
Distortion
distortY
in class Distortion
y
- the undistorted y coordinatea
- the anchor or focus point of the displayb
- the layout bounds
Distortion.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)
Distortion
distortSize
in class Distortion
bbox
- 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 bounds
Distortion.distortSize(java.awt.geom.Rectangle2D, double, double, java.awt.geom.Point2D, java.awt.geom.Rectangle2D)
public double getXMagnification()
public void setXMagnification(double mx)
mx
- The magnification factor for the x-axis.public double getYMagnification()
public void setYMagnification(double my)
my
- The magnification factor for the y-axis.public double getXRange()
public void setXRange(double rx)
rx
- The focal range for the x-axis, a value between 0 and 1.public double getYRange()
public void setYRange(double ry)
ry
- The focal range for the y-axis, a value between 0 and 1.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |