|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree_impl.graphics.transformation.WorldToScreenTransform
the class WorldToScreenTransform
implements
GeoTransformInterface
and defines a transformation
to a linear coordinat system with its orgin on top/left. this can be
used for realising a screen mapping of geometries.
Field Summary | |
private GM_Envelope |
destRect
|
private double |
qx
|
private double |
qy
|
private GM_Envelope |
sourceRect
|
Constructor Summary | |
WorldToScreenTransform()
constructor initialices the transfromation rectangles with unique values (origin 0/0; widht 1; height 1) |
|
WorldToScreenTransform(double sourceXMin,
double sourceYMin,
double sourceXMax,
double sourceYMax,
double destXMin,
double destYMin,
double destXMax,
double destYMax)
constrctor |
|
WorldToScreenTransform(GM_Envelope sourceRect,
GM_Envelope destRect)
constructor initialices the transformation rectangle using the submitted source- and destination rectangle. |
Method Summary | |
protected void |
calculateQX()
calculates the relation between the width of the destination and the source coordinate system. |
protected void |
calculateQY()
calculates the relation between the height of the destination and the source coordinate system. |
GM_Position |
getDestPoint(GM_Position point)
executes a coordinat transformation for the submitted point of the source coordinat system. |
GM_Envelope |
getDestRect()
|
double |
getDestX(double xsource)
executes a coordinat transformation for the submitted x-coordinate of the source coordinat system. |
double |
getDestY(double ysource)
executes a coordinat transformation for the submitted y-coordinate of the source coordinat system. |
GM_Position |
getSourcePoint(GM_Position point)
executes a coordinat transformation for the submitted point of the destination coordinate system. |
GM_Envelope |
getSourceRect()
|
double |
getSourceX(double xdest)
executes a coordinat transformation for the submitted x-coordinate of the destination coordinate system. |
double |
getSourceY(double ydest)
executes a coordinat transformation for the submitted y-coordinate of the destination coordinate system. |
void |
setDestRect(double xMin,
double yMin,
double xMax,
double yMax)
sets the destination rectangle |
void |
setDestRect(GM_Envelope rect)
sets the destination rectangle. |
void |
setSourceRect(double xMin,
double yMin,
double xMax,
double yMax)
sets the source rectangle |
void |
setSourceRect(GM_Envelope rect)
sets the source rectangle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private double qx
private double qy
private GM_Envelope sourceRect
private GM_Envelope destRect
Constructor Detail |
public WorldToScreenTransform()
public WorldToScreenTransform(GM_Envelope sourceRect, GM_Envelope destRect)
sourceRect
- is the boundary of the source geometry.destRect
- is the boundary of the destination rectangle (for
example a region on the screen)public WorldToScreenTransform(double sourceXMin, double sourceYMin, double sourceXMax, double sourceYMax, double destXMin, double destYMin, double destXMax, double destYMax)
sourceXMin
- minimum x-coordinate (source system) of the map.sourceYMin
- minimum y-coordinate (source system) of the map.sourceXMax
- maximum x-coordinate (source system) of the map.sourceYMax
- maximum y-coordinate (source system) of the map.destXMin
- minimum x-coordinate (destination system) of the map.destYMin
- minimum y-coordinate (destination system) of the map.destXMax
- maximum x-coordinate (destination system) of the map.destYMax
- maximum y-coordinate (destination system) of the map.Method Detail |
public void setSourceRect(GM_Envelope rect)
setSourceRect
in interface GeoTransform
rect
- is the boundary of the source geometry.public void setSourceRect(double xMin, double yMin, double xMax, double yMax)
setSourceRect
in interface GeoTransform
xMin
- minimum x-coordinate (source system) of the map.yMin
- minimum y-coordinate (source system) of the map.xMax
- maximum x-coordinate (source system) of the map.yMax
- maximum y-coordinate (source system) of the map.public GM_Envelope getSourceRect()
getSourceRect
in interface GeoTransform
public void setDestRect(GM_Envelope rect)
setDestRect
in interface GeoTransform
rect
- is the boundary of the destination rectangle (for
example a region on the screen)public void setDestRect(double xMin, double yMin, double xMax, double yMax)
setDestRect
in interface GeoTransform
xMin
- minimum x-coordinate (destination system) of the map.yMin
- minimum y-coordinate (destination system) of the map.xMax
- maximum x-coordinate (destination system) of the map.yMax
- maximum y-coordinate (destination system) of the map.public GM_Envelope getDestRect()
getDestRect
in interface GeoTransform
public double getDestX(double xsource)
getDestX
in interface GeoTransform
xsource
-
public double getDestY(double ysource)
getDestY
in interface GeoTransform
ysource
-
public GM_Position getDestPoint(GM_Position point)
getDestPoint
in interface GeoTransform
point
- in the source coordinate system.
public double getSourceX(double xdest)
getSourceX
in interface GeoTransform
xdest
-
public double getSourceY(double ydest)
getSourceY
in interface GeoTransform
ydest
-
public GM_Position getSourcePoint(GM_Position point)
getSourcePoint
in interface GeoTransform
point
- in the destination coordinate system.
protected void calculateQX()
protected void calculateQY()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |