Constructor and Description |
---|
AbstractLine() |
Modifier and Type | Method and Description |
---|---|
Rectangle |
bounds()
Returns a copy of the bounding rectangle for this shape.
|
Rectangle |
bounds(Rectangle target)
Initializes the supplied rectangle with this shape's bounding rectangle.
|
Line |
clone()
Returns a mutable copy of this line.
|
boolean |
contains(double x,
double y)
Returns true if this shape contains the specified point.
|
boolean |
contains(double x,
double y,
double w,
double h)
Returns true if this shape completely contains the specified rectangle.
|
boolean |
contains(IRectangle r)
Returns true if this shape completely contains the supplied rectangle.
|
boolean |
contains(XY point)
Returns true if this shape contains the supplied point.
|
boolean |
intersects(double rx,
double ry,
double rw,
double rh)
Returns true if this shape intersects the specified rectangle.
|
boolean |
intersects(IRectangle r)
Returns true if this shape intersects the supplied rectangle.
|
boolean |
isEmpty()
Returns true if this shape encloses no area.
|
Point |
p1()
Returns a copy of the starting point of this line.
|
Point |
p1(Point target)
Initializes the supplied point with this line's starting point.
|
Point |
p2()
Returns a copy of the ending point of this line.
|
Point |
p2(Point target)
Initializes the supplied point with this line's ending point.
|
PathIterator |
pathIterator(Transform at)
Returns an iterator over the path described by this shape.
|
PathIterator |
pathIterator(Transform at,
double flatness)
Returns an iterator over the path described by this shape.
|
double |
pointLineDist(double px,
double py)
Returns the distance from the specified point to the line defined by this line segment.
|
double |
pointLineDist(XY p)
Returns the distance from the supplied point to the line defined by this line segment.
|
double |
pointLineDistSq(double px,
double py)
Returns the square of the distance from the specified point to the line defined by this
line segment.
|
double |
pointLineDistSq(XY p)
Returns the square of the distance from the supplied point to the line defined by this line
segment.
|
double |
pointSegDist(double px,
double py)
Returns the distance from the specified point this line segment.
|
double |
pointSegDist(XY p)
Returns the distance from the supplied point this line segment.
|
double |
pointSegDistSq(double px,
double py)
Returns the square of the distance from the specified point this line segment.
|
double |
pointSegDistSq(XY p)
Returns the square of the distance from the supplied point this line segment.
|
int |
relativeCCW(double px,
double py)
Returns an indicator of where the specified point (px,py) lies with respect to this line
segment.
|
int |
relativeCCW(XY p)
Returns an indicator of where the specified point lies with respect to this line segment.
|
public Point p1()
ILine
public Point p1(Point target)
ILine
public Point p2()
ILine
public Point p2(Point target)
ILine
public double pointLineDistSq(double px, double py)
ILine
pointLineDistSq
in interface ILine
public double pointLineDistSq(XY p)
ILine
pointLineDistSq
in interface ILine
public double pointLineDist(double px, double py)
ILine
pointLineDist
in interface ILine
public double pointLineDist(XY p)
ILine
pointLineDist
in interface ILine
public double pointSegDistSq(double px, double py)
ILine
pointSegDistSq
in interface ILine
public double pointSegDistSq(XY p)
ILine
pointSegDistSq
in interface ILine
public double pointSegDist(double px, double py)
ILine
pointSegDist
in interface ILine
public double pointSegDist(XY p)
ILine
pointSegDist
in interface ILine
public int relativeCCW(double px, double py)
ILine
relativeCCW
in interface ILine
public int relativeCCW(XY p)
ILine
relativeCCW
in interface ILine
public Line clone()
ILine
public boolean isEmpty()
IShape
public boolean contains(double x, double y)
IShape
public boolean contains(XY point)
IShape
public boolean contains(double x, double y, double w, double h)
IShape
public boolean contains(IRectangle r)
IShape
public boolean intersects(double rx, double ry, double rw, double rh)
IShape
intersects
in interface IShape
public boolean intersects(IRectangle r)
IShape
intersects
in interface IShape
public Rectangle bounds()
IShape
public Rectangle bounds(Rectangle target)
IShape
public PathIterator pathIterator(Transform at)
IShape
pathIterator
in interface IShape
at
- if supplied, the points in the path are transformed using this.public PathIterator pathIterator(Transform at, double flatness)
IShape
pathIterator
in interface IShape
at
- if supplied, the points in the path are transformed using this.flatness
- when approximating curved segments with lines, this controls the maximum
distance the lines are allowed to deviate from the approximated curve, thus a higher
flatness value generally allows for a path with fewer segments.Copyright © 2017. All rights reserved.