public class IlvMapBezierSegment extends Object implements IlvMapSegment
IlvMapBezierSegment
is a spline defined by
four control points called the start point, the first control point,
the second control point, and the end point.Constructor and Description |
---|
IlvMapBezierSegment()
Initializes an instance of the class.
|
IlvMapBezierSegment(IlvCoordinate start,
IlvCoordinate control1,
IlvCoordinate control2,
IlvCoordinate end)
Creates an arc segment that goes through the start, the intermediate,
and end point given as argument.
|
Modifier and Type | Method and Description |
---|---|
Rectangle2D |
getBounds(Rectangle2D result)
Returns the bounds of this
IlvMapSegment |
IlvCoordinate |
getControlPoint1()
Returns the control1 point of the segment.
|
IlvCoordinate |
getControlPoint2()
Returns the control2 point of the segment.
|
IlvCoordinate |
getEndPoint()
Returns the end point of the segment.
|
int |
getHorizontalIntersectionCount(IlvCoordinate p)
Returns the number of intersections between an horizontal
half line defined by its right extremity point and the segment.
|
IlvCoordinate |
getStartPoint()
Returns the start point of the segment.
|
void |
setControlPoint1(IlvCoordinate control1)
Sets the first control point of the segment.
|
void |
setControlPoint2(IlvCoordinate control2)
Sets the second control point of the segment.
|
void |
setEndPoint(IlvCoordinate end)
Sets the end point of the segment.
|
void |
setStartPoint(IlvCoordinate start)
Sets the start point of the segment.
|
public IlvMapBezierSegment()
public IlvMapBezierSegment(IlvCoordinate start, IlvCoordinate control1, IlvCoordinate control2, IlvCoordinate end)
start
- The start point.control1
- The first control point.control2
- The second control point.end
- The end point.public IlvCoordinate getStartPoint()
getStartPoint
in interface IlvMapSegment
public void setStartPoint(IlvCoordinate start)
setStartPoint
in interface IlvMapSegment
start
- The start point.public void setControlPoint1(IlvCoordinate control1)
control1
- The control1 point.public IlvCoordinate getControlPoint1()
public void setControlPoint2(IlvCoordinate control2)
control2
- The control2 point.public IlvCoordinate getControlPoint2()
public IlvCoordinate getEndPoint()
getEndPoint
in interface IlvMapSegment
public void setEndPoint(IlvCoordinate end)
setEndPoint
in interface IlvMapSegment
end
- The end point.public int getHorizontalIntersectionCount(IlvCoordinate p)
IlvMapRingInterface
.
In this release (JViews 5.0), we only check the intersection
with the segments defined by the control points.getHorizontalIntersectionCount
in interface IlvMapSegment
p
- The point at the right extremity of the horizontal
half line.public Rectangle2D getBounds(Rectangle2D result)
IlvMapSegment
getBounds
in interface IlvMapSegment
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.