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(float x,
float y)
Returns true if this shape contains the specified point.
|
boolean |
contains(float x,
float y,
float w,
float 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(float rx,
float ry,
float rw,
float 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,
float flatness)
Returns an iterator over the path described by this shape.
|
float |
pointLineDist(float px,
float py)
Returns the distance from the specified point to the line defined by this line segment.
|
float |
pointLineDist(XY p)
Returns the distance from the supplied point to the line defined by this line segment.
|
float |
pointLineDistSq(float px,
float py)
Returns the square of the distance from the specified point to the line defined by this
line segment.
|
float |
pointLineDistSq(XY p)
Returns the square of the distance from the supplied point to the line defined by this line
segment.
|
float |
pointSegDist(float px,
float py)
Returns the distance from the specified point this line segment.
|
float |
pointSegDist(XY p)
Returns the distance from the supplied point this line segment.
|
float |
pointSegDistSq(float px,
float py)
Returns the square of the distance from the specified point this line segment.
|
float |
pointSegDistSq(XY p)
Returns the square of the distance from the supplied point this line segment.
|
int |
relativeCCW(float px,
float 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 float pointLineDistSq(float px, float py)
ILine
pointLineDistSq
in interface ILine
public float pointLineDistSq(XY p)
ILine
pointLineDistSq
in interface ILine
public float pointLineDist(float px, float py)
ILine
pointLineDist
in interface ILine
public float pointLineDist(XY p)
ILine
pointLineDist
in interface ILine
public float pointSegDistSq(float px, float py)
ILine
pointSegDistSq
in interface ILine
public float pointSegDistSq(XY p)
ILine
pointSegDistSq
in interface ILine
public float pointSegDist(float px, float py)
ILine
pointSegDist
in interface ILine
public float pointSegDist(XY p)
ILine
pointSegDist
in interface ILine
public int relativeCCW(float px, float 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(float x, float y)
IShape
public boolean contains(XY point)
IShape
public boolean contains(float x, float y, float w, float h)
IShape
public boolean contains(IRectangle r)
IShape
public boolean intersects(float rx, float ry, float rw, float 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, float 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.