| org.geotools.gui.swing.DeformableViewer
All known Subclasses: org.geotools.gui.swing.ZoomPane,
DeformableViewer | public interface DeformableViewer (Code) | | An interface for viewers that may be deformed by some artefacts. For example the
org.geotools.gui.swing.ZoomPane viewer is capable to show a
on top of
the usual content. The presence of a magnifying glass deforms the viewer in that
the apparent position of pixels within the glass are moved. The interface allows
for corrections of apparent pixel position in order to get the position we would
have if no deformations existed.
since: 2.2 version: $Id: DeformableViewer.java 20883 2006-08-07 13:48:09Z jgarnett $ author: Martin Desruisseaux |
Method Summary | |
void | correctApparentPixelPosition(Point2D point) Corrects a pixel's coordinates for removing the effect of the any kind of deformations.
An example of deformation is the zoom pane's
. |
correctApparentPixelPosition | void correctApparentPixelPosition(Point2D point)(Code) | | Corrects a pixel's coordinates for removing the effect of the any kind of deformations.
An example of deformation is the zoom pane's
. Without this
method, transformations from pixels to geographic coordinates would not give exact
results for pixels inside the magnifier since the magnifier moves the pixel's apparent
position. Invoking this method will remove any deformation effects using the following
steps:
- If the pixel's coordinate
point is outside deformed areas (for example
outside the magnifier), then this method do nothing.
- Otherwise, if the pixel's coordinate is inside some area that has been deformed,
then this method update
point in such a way that it contains the
position that the exact same pixel would have in the absence of deformations.
Parameters: point - In input, a pixel's coordinate as it appears on the screen.In output, the coordinate that the same pixel would have ifthe deformation wasn't presents. |
|
|