org.freehep.graphicsio
Class PolylinePathConstructor

java.lang.Object
  extended by org.freehep.graphicsio.AbstractPathConstructor
      extended by org.freehep.graphicsio.QuadToCubicPathConstructor
          extended by org.freehep.graphicsio.CubicToLinePathConstructor
              extended by org.freehep.graphicsio.PolylinePathConstructor
All Implemented Interfaces:
PathConstructor

public abstract class PolylinePathConstructor
extends CubicToLinePathConstructor

Version:
$Id: PolylinePathConstructor.java 8584 2006-08-10 23:06:37Z duns $
Author:
Mark Donszelmann

Field Summary
protected  boolean closed
           
protected  boolean fill
           
 
Fields inherited from class org.freehep.graphicsio.AbstractPathConstructor
currentX, currentY
 
Constructor Summary
PolylinePathConstructor(boolean fill)
           
PolylinePathConstructor(boolean fill, double resolution)
           
 
Method Summary
 void closePath(double x0, double y0)
          Closes the path by drawing a straight line to the last point which was argument to move.
 void line(double x, double y)
          Draws a line from the current point to (x,y) and make (x,y) the current point.
 void move(double x, double y)
          Makes (x,y) the current point.
 void writePolyline()
           
protected abstract  void writePolyline(java.util.Vector polyline)
           
 
Methods inherited from class org.freehep.graphicsio.CubicToLinePathConstructor
cubic
 
Methods inherited from class org.freehep.graphicsio.QuadToCubicPathConstructor
quad
 
Methods inherited from class org.freehep.graphicsio.AbstractPathConstructor
addPath, addPath, addPath, flush, isEvenOdd
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

closed

protected boolean closed

fill

protected boolean fill
Constructor Detail

PolylinePathConstructor

public PolylinePathConstructor(boolean fill)

PolylinePathConstructor

public PolylinePathConstructor(boolean fill,
                               double resolution)
Method Detail

move

public void move(double x,
                 double y)
          throws java.io.IOException
Description copied from interface: PathConstructor
Makes (x,y) the current point.

Specified by:
move in interface PathConstructor
Overrides:
move in class QuadToCubicPathConstructor
Throws:
java.io.IOException

line

public void line(double x,
                 double y)
          throws java.io.IOException
Description copied from interface: PathConstructor
Draws a line from the current point to (x,y) and make (x,y) the current point.

Specified by:
line in interface PathConstructor
Overrides:
line in class QuadToCubicPathConstructor
Throws:
java.io.IOException

closePath

public void closePath(double x0,
                      double y0)
               throws java.io.IOException
Description copied from interface: PathConstructor
Closes the path by drawing a straight line to the last point which was argument to move.

Specified by:
closePath in interface PathConstructor
Overrides:
closePath in class QuadToCubicPathConstructor
Throws:
java.io.IOException

writePolyline

public void writePolyline()
                   throws java.io.IOException
Throws:
java.io.IOException

writePolyline

protected abstract void writePolyline(java.util.Vector polyline)
                               throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2000-2007 FreeHEP. All Rights Reserved.