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.


Constructor Index

 o SPVGrint(int, int)

Method Index

 o box(Graphics, double, double, double, double)
DrawRect that uses world coordinates rather than pixel coordinates.
 o ph2wh(int)
pixel height to world coordinate height
 o pw2ww(int)
pixel width to world coordinate width
 o setdiff(double, double)
This method sets the width and height of the world coordinate system.
 o setMarkerSize(double)
setdiff must be called before setMarkerSize.
 o setmin(double, double)
This method sets the minimum x and y values for the world coordinate system.
 o spvDrawLine(Graphics, double, double, double, double)
DrawLine that uses world coordinates rather than pixel coordinates.
 o wh2ph(double)
world height to pixel height
 o ww2pw(double)
world width to pixel width
 o xp2xw(int)
x pixel coordinates to world coordinates
 o xw2xp(double)
x world coordinates to pixel coordinates
 o yp2yw(int)
y pixel coordinates to world coordinates
 o yw2yp(double)
y world coordinates to pixel coordinates

Constructors

 o SPVGrint
 public SPVGrint(int width,
                 int height)
Parameters:
width - Width of the graphics component in pixels
height - Height of the graphics component in pixels

Methods

 o 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.
 o 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
 o setMarkerSize
 public void setMarkerSize(double size)
setdiff must be called before setMarkerSize.

 o xw2xp
 public int xw2xp(double xwc)
x world coordinates to pixel coordinates

 o xp2xw
 public double xp2xw(int xpc)
x pixel coordinates to world coordinates

 o yw2yp
 public int yw2yp(double ywc)
y world coordinates to pixel coordinates

 o yp2yw
 public double yp2yw(int ypc)
y pixel coordinates to world coordinates

 o ww2pw
 public int ww2pw(double ww)
world width to pixel width

 o wh2ph
 public int wh2ph(double wh)
world height to pixel height

 o pw2ww
 public double pw2ww(int pw)
pixel width to world coordinate width

 o ph2wh
 public double ph2wh(int ph)
pixel height to world coordinate height

 o 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
 o 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