|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface NormalizedCoordinates
Classes that implement this interface must know hoe to provide on-screen coordinates to normalized coordinates and vice versa. The methods should return fast, as this is the interface from a customized mouse cursor to an component.
| Method Summary | |
|---|---|
Rectangle |
getArea()
Returns the size and position of the on-screen location of the drawable canvas. |
Point2D |
getNormalized(Point screen)
Converts from screen pixels into normalized space. |
Rectangle2D |
getNormalizedRect(Rectangle screen)
Converts a rectangular area from screen pixel into normalized space. |
Point |
getScreen(Point2D normalized)
Converts normalized coordinates into on-screen coordinates. |
Rectangle |
getScreenRect(Rectangle2D normalized)
Converts a rectangular area from normalized coordinates into screen pixel. |
Rectangle2D |
getViewport()
Returns the part of the normalized coordinate space that is currently visible. |
boolean |
isNormalizedOnScreen(Point2D visible)
Test if this normalized pixel is related to a on-screen pixel that is within the drawable region. |
boolean |
isScreenInNormalized(Point cursor)
Test, if a given screen point is within the currently visible normalized coordinate space. |
| Method Detail |
|---|
Rectangle getArea()
ZoomableRectangle2D getViewport()
ZoomablePoint2D getNormalized(Point screen)
Point object, while the return value
is a Point2D object.
screen - A point on the screen.
Point getScreen(Point2D normalized)
Point2D object, while we return a
Point object.
normalized - A point in normalized space, 0≤x,y&le1.
Rectangle2D getNormalizedRect(Rectangle screen)
Rectangle object, whilst the
return value is a Rectangle2D object.
screen - A rectangle on the screen.
Rectangle getScreenRect(Rectangle2D normalized)
Rectangle2D object,
whilst the
return value is a Rectangle object.
normalized - A rectangle in normalized coordinate space.
boolean isScreenInNormalized(Point cursor)
cursor - A point on the screen.boolean isNormalizedOnScreen(Point2D visible)
visible - A point in normalized space, 0≤x,y&le1.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||