All Packages Class Hierarchy This Package Previous Next Index
Class SPV_graphics.SPVGrint
java.lang.Object
|
+----SPV_graphics.SPVGrint
- public class SPVGrint
- extends Object
This class initializes the graphics process.
-
SPVGrint(int, int)
-
-
box(Graphics, double, double, double, double)
-
DrawRect that uses world coordinates rather than pixel coordinates.
-
ph2wh(int)
- pixel height to world coordinate height
-
pw2ww(int)
- pixel width to world coordinate width
-
setdiff(double, double)
-
This method sets the width and height of
the world coordinate system.
-
setMarkerSize(double)
-
setdiff must be called before setMarkerSize.
-
setmin(double, double)
-
This method sets the minimum x and y
values for the world coordinate system.
-
spvDrawLine(Graphics, double, double, double, double)
-
DrawLine that uses world coordinates rather than pixel coordinates.
-
wh2ph(double)
- world height to pixel height
-
ww2pw(double)
- world width to pixel width
-
xp2xw(int)
- x pixel coordinates to world coordinates
-
xw2xp(double)
- x world coordinates to pixel coordinates
-
yp2yw(int)
- y pixel coordinates to world coordinates
-
yw2yp(double)
- y world coordinates to pixel coordinates
SPVGrint
public SPVGrint(int width,
int height)
- Parameters:
- width - Width of the graphics component in pixels
- height - Height of the graphics component in pixels
setmin
public void setmin(double xmin,
double ymin)
- This method sets the minimum x and y
values for the world coordinate system.
(xmin,ymin) is the lower left point in the
world coordinate system.
- Parameters:
- xmin - Minimum x value in the world coordinate system
- ymin - Minimum y value in the world coordinate system.
setdiff
public void setdiff(double xdiff,
double ydiff)
- This method sets the width and height of
the world coordinate system. (xmin+xdiff,ymin+ydiff)
is the upper right point in the
world coordinate system.
- Parameters:
- xdiff - Difference between the maximum and minimum
x values in the world coordinate system
- ydiff - Difference between the maximum and minimum
y values in the world coordinate system
setMarkerSize
public void setMarkerSize(double size)
- setdiff must be called before setMarkerSize.
xw2xp
public int xw2xp(double xwc)
- x world coordinates to pixel coordinates
xp2xw
public double xp2xw(int xpc)
- x pixel coordinates to world coordinates
yw2yp
public int yw2yp(double ywc)
- y world coordinates to pixel coordinates
yp2yw
public double yp2yw(int ypc)
- y pixel coordinates to world coordinates
ww2pw
public int ww2pw(double ww)
- world width to pixel width
wh2ph
public int wh2ph(double wh)
- world height to pixel height
pw2ww
public double pw2ww(int pw)
- pixel width to world coordinate width
ph2wh
public double ph2wh(int ph)
- pixel height to world coordinate height
spvDrawLine
public void spvDrawLine(Graphics g,
double x1,
double y1,
double x2,
double y2)
- DrawLine that uses world coordinates rather than pixel coordinates.
- Parameters:
- g - The graphics context
- x1 - The (world) x coordinate of the starting point
- y1 - The (world) y coordinate of the starting point
- x2 - The (world) x coordinate of the ending point
- y2 - The (world) y coordinate of the ending point
box
public void box(Graphics g,
double xmin,
double ymin,
double xmax,
double ymax)
- DrawRect that uses world coordinates rather than pixel coordinates.
- Parameters:
- g - Graphics context
- xmin - x coordinate of lower left corner
- ymin - y coordinate of lower left corner
- xmax - x coordinate of upper right corner
- ymax - y coordinate of upper right corner
All Packages Class Hierarchy This Package Previous Next Index