scenic.path
Class SubPath

java.lang.Object
  extended by scenic.path.SubPath

public class SubPath
extends java.lang.Object

A subpath defines a continuous path which consists of different kinds of segments. If a subpath is closed its end point is connected to the start point with a straight line.


Constructor Summary
SubPath(double startX, double startY, Segment[] segments, boolean closed)
          Creates a new subpath with the given start point and segments.
 
Method Summary
 void getBounds(java.awt.geom.AffineTransform transform, java.awt.Rectangle r)
          Gets the bounds of this subpath using the given transform.
 Segment[] getSegments()
          Gets the segments.
 double getStartX()
          Gets the x coordinate of the start point.
 double getStartY()
          Gets the y coordinate of the start point.
 boolean isClosed()
          Gets is the subpath closed.
 void walk(PathWalker walker, java.awt.geom.AffineTransform error)
          Walks the given walker through this subpath.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubPath

public SubPath(double startX,
               double startY,
               Segment[] segments,
               boolean closed)
Creates a new subpath with the given start point and segments.

Parameters:
startX - x coordinate of the start point.
startY - y coordinate of the start point.
segments - the segments.
closed - defines is the subpath closed.
Method Detail

getStartX

public double getStartX()
Gets the x coordinate of the start point.


getStartY

public double getStartY()
Gets the y coordinate of the start point.


isClosed

public boolean isClosed()
Gets is the subpath closed.


getSegments

public Segment[] getSegments()
Gets the segments.


walk

public void walk(PathWalker walker,
                 java.awt.geom.AffineTransform error)
Walks the given walker through this subpath.

Parameters:
walker - the walker.
error - the error matrix.

getBounds

public void getBounds(java.awt.geom.AffineTransform transform,
                      java.awt.Rectangle r)
Gets the bounds of this subpath using the given transform.

Parameters:
transform - the transform
r - the bounds.