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 IlvMapMultiPointInterfaceremoveAll in interface IlvMapSegmentStringInterfacepublic boolean removePoint(IlvCoordinate c)
removePoint in interface IlvMapMultiPointInterfacec - The coordinate to remove.true if the coordinate was in the line string.public int getPointCount()
getPointCount in interface IlvMapMultiPointInterfacepublic void addPoint(IlvCoordinate c)
addPoint in interface IlvMapMultiPointInterfacec - The coordinate.public IlvCoordinate getPoint(int index)
getPoint in interface IlvMapMultiPointInterfaceindex - The index.public void lineTo(IlvCoordinate c)
c - The coordinate of the end of
the new segment.public int getSegmentCount()
getSegmentCount in interface IlvMapSegmentStringInterfacepublic IlvMapSegment getSegment(int index)
getSegment in interface IlvMapSegmentStringInterfaceindex - 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 IlvMapSegmentpublic IlvCoordinate getEndPoint()
getEndPoint in interface IlvMapSegmentpublic void setStartPoint(IlvCoordinate start)
setStartPoint in interface IlvMapSegmentstart - The start point.public void setEndPoint(IlvCoordinate end)
setEndPoint in interface IlvMapSegmentend - 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 IlvMapSegmentc - 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()
IlvMapGeometrypublic IlvCoordinate getUpperLeftCorner()
IlvMapGeometrypublic Rectangle2D getBounds(Rectangle2D result)
IlvMapGeometrygetBounds in interface IlvMapSegmentgetBounds in class IlvMapGeometry© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.