org.omegahat.Graphics.Primitives
Class PolypointPrimitive

java.lang.Object
  |
  +--org.omegahat.Graphics.Primitives.GraphicalObject
        |
        +--org.omegahat.Graphics.Primitives.RGO
              |
              +--org.omegahat.Graphics.Primitives.PolypointPrimitive
All Implemented Interfaces:
GraphicalComponentInt
Direct Known Subclasses:
PolygonPrimitive, PolylinePrimitive

public class PolypointPrimitive
extends RGO

Class extended by specific classes for plotting objects that derive from arrays of x and y co-ordinates.


Field Summary
protected  int howDraw
           
protected  double[] xData
           
protected  double[] yData
           
 
Fields inherited from class org.omegahat.Graphics.Primitives.RGO
region
 
Fields inherited from class org.omegahat.Graphics.Primitives.GraphicalObject
ACTIVE, fontSize, lastDevice, lastHeightCM, lastRegion, lastWidthCM, parents, status, VISIBLE
 
Constructor Summary
PolypointPrimitive()
           
PolypointPrimitive(double[] x, double[] y, int howDraw)
           
PolypointPrimitive(double[] x, double[] y, int unitX, int unitY, int howDraw)
           
 
Method Summary
 Region draw(RectRegion rr, ScaleInt sx, ScaleInt sy, int origin, double widthCM, double heightCM, int fontSize, OutputDevice od, GraphicalContainerInt parentId)
          draw the object in the rectangular region rr, using scales sx and sy.
protected  void make()
           
 
Methods inherited from class org.omegahat.Graphics.Primitives.RGO
center, centre, createRegionDescription, createRegionDescription, getRegion, height, height, setHJust, setRegion, setVJust, width, width, x, x, y, y
 
Methods inherited from class org.omegahat.Graphics.Primitives.GraphicalObject
cacheSize, getFontSize, getFontSize, getParameters, getParents, getStatus, isActive, isVisible, lastHeightCM, lastRegion, lastWidthCM, parent, parent, parents, setActive, setParameters, setParents, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

howDraw

protected int howDraw

xData

protected double[] xData

yData

protected double[] yData
Constructor Detail

PolypointPrimitive

public PolypointPrimitive()

PolypointPrimitive

public PolypointPrimitive(double[] x,
                          double[] y,
                          int unitX,
                          int unitY,
                          int howDraw)

PolypointPrimitive

public PolypointPrimitive(double[] x,
                          double[] y,
                          int howDraw)
Method Detail

make

protected void make()

draw

public Region draw(RectRegion rr,
                   ScaleInt sx,
                   ScaleInt sy,
                   int origin,
                   double widthCM,
                   double heightCM,
                   int fontSize,
                   OutputDevice od,
                   GraphicalContainerInt parentId)
Description copied from class: GraphicalObject
draw the object in the rectangular region rr, using scales sx and sy.
Overrides:
draw in class GraphicalObject
Following copied from interface: org.omegahat.Graphics.Primitives.GraphicalComponentInt
Parameters:
rr - the parents RectRegion in normalized device coordinates (NDC).
sx - the parent's horizontal scale for transforming between arbitrary units.
sy - the parent's vertical scale for transforming between arbitrary units.
origin - the parent's origin position.