Package cnuphys.snr.test
Class TestSupport
java.lang.Object
cnuphys.snr.test.TestSupport
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
toLocal
(Rectangle2D.Double wr, Rectangle localSystem, Point pp, double wx, double wy) This converts a world point to a screen or pixel point.static void
toLocal
(Rectangle2D.Double wr, Rectangle localSystem, Point pp, Point2D.Double wp) This converts a world point to a screen or pixel point.static void
toLocal
(Rectangle2D.Double world, Rectangle localSystem, Rectangle r, Rectangle2D.Double wr) This converts a world rectangle to a screen or pixel rect.static void
toWorld
(Rectangle2D.Double wr, Rectangle localSystem, Point pp, Point2D.Double wp) This converts a screen or pixel point to a world point.static void
toWorld
(Rectangle2D.Double world, Rectangle localSystem, Rectangle r, Rectangle2D.Double wr) This converts a screen or local rectangle to world rect.
-
Constructor Details
-
TestSupport
public TestSupport()
-
-
Method Details
-
toWorld
public static void toWorld(Rectangle2D.Double wr, Rectangle localSystem, Point pp, Point2D.Double wp) This converts a screen or pixel point to a world point.- Parameters:
localSystem
- a rectangle defining the local (screen-pixel) coordinate system.pp
- contains the local (screen-pixel) point.wp
- will hold the resultant world point.
-
toLocal
public static void toLocal(Rectangle2D.Double wr, Rectangle localSystem, Point pp, Point2D.Double wp) This converts a world point to a screen or pixel point.- Parameters:
localSystem
- a rectangle defining the local (screen-pixel) coordinate system.pp
- will hold the resultant local (screen-pixel) point.wp
- contains world point.
-
toLocal
public static void toLocal(Rectangle2D.Double world, Rectangle localSystem, Rectangle r, Rectangle2D.Double wr) This converts a world rectangle to a screen or pixel rect.- Parameters:
localSystem
- a rectangle defining the local (screen-pixel) coordinate system.r
- will hold the resultant local (screen-pixel) rectangle.wr
- contains the world rectangle.
-
toWorld
public static void toWorld(Rectangle2D.Double world, Rectangle localSystem, Rectangle r, Rectangle2D.Double wr) This converts a screen or local rectangle to world rect.- Parameters:
localSystem
- a rectangle defining the local (screen-pixel) coordinate system.r
- contains the local (screen-pixel) rectangle.wr
- will hold the resultant world rectangle.
-
toLocal
public static void toLocal(Rectangle2D.Double wr, Rectangle localSystem, Point pp, double wx, double wy) This converts a world point to a screen or pixel point.- Parameters:
localSystem
- a rectangle defining the local (screen-pixel) coordinate system.pp
- will hold the resultant local (screen-pixel) point.wx
- the world x coordinate.wy
- the world y coordinate.
-