org.freehep.graphicsio
Class CubicToLinePathConstructor

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

public abstract class CubicToLinePathConstructor
extends QuadToCubicPathConstructor

Implements cubics by approximating them using a polyline. Useful class for output formats that do NOT implement bezier curves at all, or if you need only straight lines.

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

Field Summary
 
Fields inherited from class org.freehep.graphicsio.AbstractPathConstructor
currentX, currentY
 
Constructor Summary
protected CubicToLinePathConstructor()
           
protected CubicToLinePathConstructor(double resolution)
           
 
Method Summary
 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.
 
Methods inherited from class org.freehep.graphicsio.QuadToCubicPathConstructor
closePath, line, move, 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
 

Constructor Detail

CubicToLinePathConstructor

protected CubicToLinePathConstructor()

CubicToLinePathConstructor

protected CubicToLinePathConstructor(double resolution)
Method Detail

cubic

public void cubic(double x1,
                  double y1,
                  double x2,
                  double y2,
                  double x3,
                  double y3)
           throws java.io.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.

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


Copyright © 2000-2007 FreeHEP. All Rights Reserved.