public class IlvMapBezierString extends IlvMapSegmentString
IlvMapSegmentString
is optimized to handle
strings that contain only IlvMapBezierSegment
instances.
The instances of this class can be
rendered by an IlvDefaultFeatureRenderer
or by an
IlvDefaultCurveRenderer
.Constructor and Description |
---|
IlvMapBezierString(IlvCoordinate start)
Initializes an instance of the class.
|
Modifier and Type | Method and Description |
---|---|
void |
bezierTo(IlvCoordinate control1,
IlvCoordinate control2,
IlvCoordinate end)
Adds an bezier at the end of the string.
|
IlvMapBezierSegment |
getBezierSegment(int index)
Returns the bezier segment of the specified index.
|
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. |
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.
|
void |
removeAll()
Removes all the segments in the string and sets the start point
to (0.,0.).
|
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 IlvMapBezierString(IlvCoordinate start)
start
- The start point.public void bezierTo(IlvCoordinate control1, IlvCoordinate control2, IlvCoordinate end)
control1
- The first control point.control2
- The second control point.end
- The end point.public int getSegmentCount()
public IlvMapSegment getSegment(int index)
index
- The index of the segment to be retrieved. \a 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 IlvMapBezierSegment getBezierSegment(int index)
index
- The index of the segment to be retrieved. \a index must
have a value between 0
and
getSegmentCount() - 1
.IlvMapBezierSegment
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 void removeAll()
public IlvCoordinate getStartPoint()
public IlvCoordinate getEndPoint()
public void setStartPoint(IlvCoordinate start)
start
- The start point.public void setEndPoint(IlvCoordinate end)
end
- The end point.public int getHorizontalIntersectionCount(IlvCoordinate c)
c
and the segment.
This function is used for point inclusion tests of
IlvMapRingInterface
.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 Rectangle2D getBounds(Rectangle2D result)
IlvMapGeometry
getBounds
in interface IlvMapSegment
getBounds
in class IlvMapGeometry
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.