|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectscenic.path.Path
public class Path
This class defines a path that can be used for stroking and filling. A path consists of one or more subpaths. Each subpath consists of one or more connected segments. There are different kinds of segments: straight lines, Bezier curves and elliptical arcs. Path, subpaths and segments are constant. Their values cannot be changed after they are created.
| Constructor Summary | |
|---|---|
Path(java.awt.Shape shape,
java.awt.geom.AffineTransform transform,
double flatness)
Creates a path from the given java.awt.Shape object. |
|
Path(SubPath[] subPaths)
Creates a path that has the given subpaths. |
|
| Method Summary | |
|---|---|
static void |
addPointToBounds(java.awt.geom.AffineTransform tm,
java.awt.Rectangle r,
double xp,
double yp)
Helper method which modifies the rectangle so that it contains the given point when using the given transform. |
java.awt.Rectangle |
getBounds(java.awt.geom.AffineTransform transform)
Calculates the bounds of this path using the given transform. |
SubPath[] |
getSubPaths()
Gets the subpaths. |
void |
walk(PathWalker walker,
java.awt.geom.AffineTransform error)
Walks the given walker through the path. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Path(SubPath[] subPaths)
subPaths - the subpaths.
public Path(java.awt.Shape shape,
java.awt.geom.AffineTransform transform,
double flatness)
shape - the source pathtransform - matrix that is used to transform the path (can be null)flatness - maximum deviation from correct path (only used for arcs and ellipses)| Method Detail |
|---|
public SubPath[] getSubPaths()
public void walk(PathWalker walker,
java.awt.geom.AffineTransform error)
walker - the walker.error - the error matrix.public java.awt.Rectangle getBounds(java.awt.geom.AffineTransform transform)
transform - the transform.
public static void addPointToBounds(java.awt.geom.AffineTransform tm,
java.awt.Rectangle r,
double xp,
double yp)
tm - the transform.r - the rectangle.xp - the x coordinate of the point.yp - the y coordinate of the point.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||