Package com.mxgraph.util
Class mxLine
java.lang.Object
com.mxgraph.util.mxPoint
com.mxgraph.util.mxLine
- All Implemented Interfaces:
Serializable
,Cloneable
Implements a line with double precision coordinates.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the end point of the line.double
ptLineDistSq
(mxPoint pt) Returns the square of the shortest distance from a point to this line.double
ptSegDistSq
(mxPoint pt) Returns the square of the shortest distance from a point to this line segment.void
setEndPoint
(mxPoint value) Sets the end point of the rectangle.void
Sets the start and end points.
-
Field Details
-
endPoint
The end point of the line
-
-
Constructor Details
-
mxLine
Creates a new line -
mxLine
Creates a new line
-
-
Method Details
-
getEndPoint
Returns the end point of the line.- Returns:
- Returns the end point of the line.
-
setEndPoint
Sets the end point of the rectangle.- Parameters:
value
- The new end point of the line
-
setPoints
Sets the start and end points. -
ptLineDistSq
Returns the square of the shortest distance from a point to this line. The line is considered extrapolated infinitely in both directions for the purposes of the calculation.- Parameters:
pt
- the point whose distance is being measured- Returns:
- the square of the distance from the specified point to this line.
-
ptSegDistSq
Returns the square of the shortest distance from a point to this line segment.- Parameters:
pt
- the point whose distance is being measured- Returns:
- the square of the distance from the specified point to this segment.
-