new Line(begin, end)
- Source:
Line shape.
Parameters:
Name | Type | Description |
---|---|---|
begin |
dwv.math.Point2D | A Point2D representing the beginning of the line. |
end |
dwv.math.Point2D | A Point2D representing the end of the line. |
Methods
equals(rhs) → {boolean}
- Source:
Check for equality.
Parameters:
Name | Type | Description |
---|---|---|
rhs |
dwv.math.Line | The object to compare to. |
Returns:
True if both objects are equal.
- Type
- boolean
getBegin() → {dwv.math.Point2D}
- Source:
Get the begin point of the line.
Returns:
The beginning point of the line.
- Type
- dwv.math.Point2D
getDeltaX() → {number}
- Source:
Get the line delta in the X direction.
Returns:
The delta in the X direction.
- Type
- number
getDeltaY() → {number}
- Source:
Get the line delta in the Y direction.
Returns:
The delta in the Y direction.
- Type
- number
getEnd() → {dwv.math.Point2D}
- Source:
Get the end point of the line.
Returns:
The ending point of the line.
- Type
- dwv.math.Point2D
getInclination() → {number}
- Source:
Get the inclination of the line.
Returns:
The inclination of the line.
- Type
- number
getIntercept() → {number}
- Source:
Get the intercept of the line.
Returns:
The slope of the line.
- Type
- number
getLength() → {number}
- Source:
Get the length of the line.
Returns:
The length of the line.
- Type
- number
getMidpoint() → {dwv.math.Point2D}
- Source:
Get the mid point of the line.
Returns:
The mid point of the line.
- Type
- dwv.math.Point2D
getSlope() → {number}
- Source:
Get the slope of the line.
Returns:
The slope of the line.
- Type
- number
getWorldLength(spacingX, spacingY) → {number}
- Source:
Get the length of the line according to a spacing.
Parameters:
Name | Type | Description |
---|---|---|
spacingX |
number | The X spacing. |
spacingY |
number | The Y spacing. |
Returns:
The length of the line with spacing or null for null spacings.
- Type
- number
quantify(viewController) → {object}
- Source:
Quantify a line according to view information.
Parameters:
Name | Type | Description |
---|---|---|
viewController |
object | The associated view controller. |
Returns:
A quantification object.
- Type
- object