public class Path
extends java.lang.Object
implements java.lang.Cloneable
| Constructor and Description |
|---|
Path() |
Path(float sx,
float sy,
float tx,
float ty)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Point |
addPoint(float x,
float y)
Add a point to the path.
|
void |
addPoint(Point p)
Add a point to the path.
|
Path |
clone() |
java.util.List<Point> |
getPoints()
Return the list of points.
|
float |
getSourceX()
Return source x position.
|
float |
getSourceY()
Return source y position.
|
float |
getTargetX()
Return target x position.
|
float |
getTargetY()
Return target y position.
|
boolean |
hasPoints()
Return true if the path has points.
|
void |
setSource(float x,
float y)
Set the source position.
|
void |
setSourceX(float x)
Set the source x position.
|
void |
setSourceY(float y)
Set the source y position.
|
void |
setTarget(float x,
float y)
Set the target position.
|
void |
setTargetX(float x)
Set the target x position.
|
void |
setTargetY(float y)
Set the target y position.
|
public Path()
public Path(float sx,
float sy,
float tx,
float ty)
sx - the source x positionsy - the source y positiontx - the target x positionty - the target y positionpublic void setSource(float x,
float y)
x - the source x positiony - the source y positionpublic void setSourceX(float x)
x - the source x positionpublic float getSourceX()
public void setSourceY(float y)
y - the source y positionpublic float getSourceY()
public void setTarget(float x,
float y)
x - the target x positiony - the target y positionpublic void setTargetX(float x)
x - the target x positionpublic float getTargetX()
public void setTargetY(float y)
y - the target y positionpublic float getTargetY()
public void addPoint(Point p)
p - the pointpublic Point addPoint(float x, float y)
x - the point x positiony - the point y positionpublic java.util.List<Point> getPoints()
public boolean hasPoints()
public Path clone()
clone in class java.lang.ObjectCopyright © 2021, 2022 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence