org.freehep.graphicsio
Interface PathConstructor

All Known Implementing Classes:
AbstractPathConstructor, CharstringEncoder, CubicToLinePathConstructor, CubicToQuadPathConstructor, EMFPathConstructor, PDFPathConstructor, PolylinePathConstructor, PSPathConstructor, QuadToCubicPathConstructor, SWFPathConstructor

public interface PathConstructor

Interface for objects that are capable of constructing paths. Path painting (stroking or filling) is not included.

Version:
$Id: PathConstructor.java 8584 2006-08-10 23:06:37Z duns $
Author:
Simon Fischer

Method Summary
 boolean addPath(java.awt.Shape s)
          Adds the points of the shape using path construction operators.
 boolean addPath(java.awt.Shape s, java.awt.geom.AffineTransform transform)
          Adds the points of the shape using path construction operators, using the given transform.
 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 flush()
          Flushes any cached info to the output file.
 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.
 

Method Detail

move

void move(double x,
          double y)
          throws java.io.IOException
Makes (x,y) the current point.

Throws:
java.io.IOException

line

void line(double x,
          double y)
          throws java.io.IOException
Draws a line from the current point to (x,y) and make (x,y) the current point.

Throws:
java.io.IOException

quad

void quad(double x1,
          double y1,
          double x2,
          double y2)
          throws java.io.IOException
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:
java.io.IOException

cubic

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

closePath

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

Throws:
java.io.IOException

flush

void flush()
           throws java.io.IOException
Flushes any cached info to the output file. The path is complete at this point.

Throws:
java.io.IOException

addPath

boolean addPath(java.awt.Shape s)
                throws java.io.IOException
Adds the points of the shape using path construction operators. The path is neither stroked nor filled.

Returns:
true if even-odd winding rule should be used, false if non-zero winding rule should be used.
Throws:
java.io.IOException

addPath

boolean addPath(java.awt.Shape s,
                java.awt.geom.AffineTransform transform)
                throws java.io.IOException
Adds the points of the shape using path construction operators, using the given transform. The path is neither stroked nor filled.

Returns:
true if even-odd winding rule should be used, false if non-zero winding rule should be used.
Throws:
java.io.IOException


Copyright © 2000-2007 FreeHEP. All Rights Reserved.