CODLineComponent::GetOrthogonalPoint
CPointCODLineComponent::GetOrthogonalPoint(const intnRow, const intnCol, const CRect&rcPadding)
Returns a point orthogonal to the two endpoints of the line.
Defined in: OdLineComp.cpp
Return Value
A logical point that is orthogonal to the two line endpoints.
Parameters
nRow
Row number of point to calculate.
nCol
Column number of point to calculate.
rcPadding
Padding required for line segments.
Comments
The row and column are used to index a 5x5 matrix of points that surround the two endpoints. All of the points in the matrix are orthogonal to the endpoints. The matrix can be thought of as two rectangles and a point in the center. The outer rectangle contains 16 points and the inner rectangle contains 8 points (16+8+1=25). The endpoints always lie in either the 2nd or 4th column and the 2nd or 4th row. In other words, the endpoints are always two of the four corners of the inner rectangle. The outer rectangle is calculated by inflating the inner rectangle using the padding value passed in.See Also