|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjview.Transform2D
public class Transform2D
A simple class that directly scales user-space coordinates into normalized coordinates.
| Field Summary | |
|---|---|
private Rectangle2D |
bounds
All we have to know for the coordinate transformation. |
| Constructor Summary | |
|---|---|
Transform2D(double xmin,
double xmax,
double ymin,
double ymax)
Constructs a 2D transformation with the specified x/y bounds. |
|
Transform2D(Rectangle2D rect)
Constructs a 2D transformation with the specified x/y bounds. |
|
| Method Summary | |
|---|---|
Point2D |
toNormalizedSpace(VectorG twodim)
Converts a user coordinate into normalized coordinates. |
VectorG |
toUserSpace(Point2D norm)
Converts normalized coordinates to user space. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Rectangle2D bounds
| Constructor Detail |
|---|
public Transform2D(double xmin,
double xmax,
double ymin,
double ymax)
xmin - The user-space x-coordinate that translates to zero.xmax - The user-space x-coordinate that translates to one.ymin - The user-space y-coordinate that translates to zero.ymax - The user-space y-coordinate that translates to one.public Transform2D(Rectangle2D rect)
rect - The bounding rectangle.| Method Detail |
|---|
public Point2D toNormalizedSpace(VectorG twodim)
toNormalizedSpace in interface CoordinateTransformingtwodim - A vector of user coordinates.
public VectorG toUserSpace(Point2D norm)
toUserSpace in interface CoordinateTransformingnorm - A pixel in normalized coordinates.
Vector2D.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||