FreeHEP API
Version current

org.freehep.graphicsio
Class QuadToCubicPathConstructor

java.lang.Object
  extended byorg.freehep.graphicsio.AbstractPathConstructor
      extended byorg.freehep.graphicsio.QuadToCubicPathConstructor
All Implemented Interfaces:
PathConstructor
Direct Known Subclasses:
CharstringEncoder, CubicToLinePathConstructor, EMFPathConstructor, LatexPathConstructor, PDFPathConstructor, PSPathConstructor

public abstract class QuadToCubicPathConstructor
extends AbstractPathConstructor

Implements the Quadratic Bezier Curve PathConstructor functionality in terms of Cubic Bezier Curves

Version:
$Id: QuadToCubicPathConstructor.java,v 1.2 2004/05/04 17:20:55 duns Exp $
Author:
Mark Donszelmann
Source Code:
QuadToCubicPathConstructor.java

Field Summary
 
Fields inherited from class org.freehep.graphicsio.AbstractPathConstructor
currentX, currentY
 
Constructor Summary
protected QuadToCubicPathConstructor()
           
 
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 cubic(double x1, double y1, double x2, double y2, double x3, double y3)
          Draws a cubic bezier curve from the current point to (x3, y3) using the control points (x1, y1) and (x2, y2) and make (x3, y3) the current point.
 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 quad(double x1, double y1, double x2, double y2)
          Draws a quadratic bezier curve from the current point to (x2, y2) using the control point (x1, y1) and make (x2, y2) the current point.
 
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
 

Constructor Detail

QuadToCubicPathConstructor

protected QuadToCubicPathConstructor()
Method Detail

move

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

Throws:
IOException

line

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

Throws:
IOException

quad

public void quad(double x1,
                 double y1,
                 double x2,
                 double y2)
          throws IOException
Description copied from interface: PathConstructor
Draws a quadratic bezier curve from the current point to (x2, y2) using the control point (x1, y1) and make (x2, y2) the current point.

Throws:
IOException

cubic

public void cubic(double x1,
                  double y1,
                  double x2,
                  double y2,
                  double x3,
                  double y3)
           throws IOException
Description copied from interface: PathConstructor
Draws a cubic bezier curve from the current point to (x3, y3) using the control points (x1, y1) and (x2, y2) and make (x3, y3) the current point.

Throws:
IOException

closePath

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

Throws:
IOException

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.