Module is.codion.swing.common.ui
Class ImagePane.CoordinateTranslator
java.lang.Object
is.codion.swing.common.ui.component.image.ImagePane.CoordinateTranslator
- Enclosing class:
ImagePane
Provides coordinate translations.
-
Method Summary
Modifier and TypeMethodDescriptionConverts this pane's point into the original image coordinatestoPane(Point2D.Double imageCoordinate) Converts the original image point into this pane's coordinatesbooleanwithinImage(Point paneCoordinate) Tests whether a given pane coordinate in the pane falls within the image boundaries.
-
Method Details
-
toImage
Converts this pane's point into the original image coordinates- Parameters:
paneCoordinate- the pane coordinates- Returns:
- the image coordinates
-
toPane
Converts the original image point into this pane's coordinates- Parameters:
imageCoordinate- the image coordinates- Returns:
- the pane coordinates
-
withinImage
Tests whether a given pane coordinate in the pane falls within the image boundaries.- Parameters:
paneCoordinate- the point on the pane- Returns:
- true if an image is available and the given point is within the image
-