CODLineComponent::CalcEndpointDirections

voidCODLineComponent::CalcEndpointDirections(CSize&szDirPt1, CSize&szDirPt2)

Calculates a direction vector for each endpoint.

Defined in: OdLineComp.cpp

Return Value

void

Parameters

szDirPt1

Returns direction vector for first point.

szDirPt2

Returns direction vector for last point.

Comments

This function calculates the orthogonal direction vector for each endpoint. The direction vectors returned by this function always point towards each other (i.e. opposite directions). Whether or not they are horizontal or vertical is determined by how far apart the endpoints are in each direction. If they are further apart horizontally than vertically, the direction vectors will be horizontal. If they are further apart vertically than horizontally, the direction vectors will be vertical. The direction vectors always have a magnitude of 1. The following direction vectors are valid: Up=(0,-1), Down=(0,1), Left=(-1,0), Right=(1,0).

See Also

MakeOrthogonal