public class IlvMapLineString extends IlvMapSegmentString implements IlvMapMultiPointInterface
Constructor and Description |
---|
IlvMapLineString()
Initializes an instance of the class.
|
IlvMapLineString(IlvCoordinate c)
Initializes an instance of the class.
|
IlvMapLineString(int start,
int count,
IlvCoordinate[] array)
Initialize an instance of IlvMapLinestring by copying coordinates from the
specified array.
|
Modifier and Type | Method and Description |
---|---|
void |
addPoint(IlvCoordinate c)
Adds a coordinate at the end of the line string.
|
Rectangle2D |
getBounds(Rectangle2D result)
Returns the bounds of this
IlvMapGeometry |
IlvCoordinate |
getEndPoint()
Returns the end point of the last segment, if it exists.
|
int |
getHorizontalIntersectionCount(IlvCoordinate c)
Returns the number of intersections between an horizontal
half line defined by its right extremity
c and the segment. |
IlvMapLinearSegment |
getLinearSegment(int index)
Returns the segment of the specified index as an
IlvMapLinearSegment . |
IlvCoordinate |
getLowerRightCorner()
Returns the lower right corner of the bounding rectangle of this
IlvMapGeometry |
IlvCoordinate |
getPoint(int index)
Returns the coordinate of the specified index.
|
int |
getPointCount()
Returns the number of points in the line string.
|
IlvMapSegment |
getSegment(int index)
Returns the segment of the specified index.
|
int |
getSegmentCount()
Returns the number of segments contained
in the string.
|
IlvCoordinate |
getStartPoint()
Returns the start point of the first segment, if it exists.
|
IlvCoordinate |
getUpperLeftCorner()
Returns the upper left corner of the bounding rectangle of this
IlvMapGeometry |
void |
lineTo(IlvCoordinate c)
Appends a new linear segment to the string.
|
void |
removeAll()
Removes all the coordinates from the line string.
|
boolean |
removePoint(IlvCoordinate c)
Removes a coordinate from the line string.
|
void |
setEndPoint(IlvCoordinate end)
Sets the end point of the last segment if it exists.
|
void |
setStartPoint(IlvCoordinate start)
Sets the start point of the first segment, if it exists.
|
public IlvMapLineString()
public IlvMapLineString(IlvCoordinate c)
public IlvMapLineString(int start, int count, IlvCoordinate[] array)
start
- The starting index of points to use to build this line string.count
- The number of points to copy.array
- The array of coordinates to use.public void removeAll()
removeAll
in interface IlvMapMultiPointInterface
removeAll
in interface IlvMapSegmentStringInterface
public boolean removePoint(IlvCoordinate c)
removePoint
in interface IlvMapMultiPointInterface
c
- The coordinate to remove.true
if the coordinate was in the line string.public int getPointCount()
getPointCount
in interface IlvMapMultiPointInterface
public void addPoint(IlvCoordinate c)
addPoint
in interface IlvMapMultiPointInterface
c
- The coordinate.public IlvCoordinate getPoint(int index)
getPoint
in interface IlvMapMultiPointInterface
index
- The index.public void lineTo(IlvCoordinate c)
c
- The coordinate of the end of
the new segment.public int getSegmentCount()
getSegmentCount
in interface IlvMapSegmentStringInterface
public IlvMapSegment getSegment(int index)
getSegment
in interface IlvMapSegmentStringInterface
index
- The index of the segment to be retrieved. index
must have a value between 0
and
getSegmentCount() - 1
.IlvMapSegment
object that should not be
modified nor deleted by the user. The returned
IlvMapSegment
is volatile. This means that it may be
modified or deleted by the IlvMapSegmentString
itself
after another call to this function, or after any modification.public IlvMapLinearSegment getLinearSegment(int index)
IlvMapLinearSegment
.index
- The index of the segment to be retrieved. index
must have a value between 0
and
getSegmentCount() - 1
.IlvMapLinearSegment
object that should not be
modified nor
deleted by the user. The returned IlvMapSegment
is
volatile. This means that it may be modified or deleted by the
IlvMapSegmentString
itself after
another call to this function, or after any modification.public IlvCoordinate getStartPoint()
getStartPoint
in interface IlvMapSegment
public IlvCoordinate getEndPoint()
getEndPoint
in interface IlvMapSegment
public void setStartPoint(IlvCoordinate start)
setStartPoint
in interface IlvMapSegment
start
- The start point.public void setEndPoint(IlvCoordinate end)
setEndPoint
in interface IlvMapSegment
end
- The end point.public int getHorizontalIntersectionCount(IlvCoordinate c)
c
and the segment.
This function is used for point inclusion tests of
IlvMapRingInterface
.getHorizontalIntersectionCount
in interface IlvMapSegment
c
- The point at the right extremity of the horizontal
half line.1
if the point is on the segment, 2
if the point is not on
the segment. If the point is on the segment where the tangent is not
horizontal, the intersection should not be counted.public IlvCoordinate getLowerRightCorner()
IlvMapGeometry
public IlvCoordinate getUpperLeftCorner()
IlvMapGeometry
public Rectangle2D getBounds(Rectangle2D result)
IlvMapGeometry
getBounds
in interface IlvMapSegment
getBounds
in class IlvMapGeometry
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.