+ if (dimensionType == DTLinearVert)
+ {
+ if ((angle < 0) || (angle > PI))
+ {
+ x1 = (position.x > endpoint.x ? position.x : endpoint.x);
+ y1 = (position.y > endpoint.y ? position.y : endpoint.y);
+ ortho = Vector(1.0, 0);
+ angle = PI3_OVER_2;
+ }
+ else
+ {
+ x1 = (position.x > endpoint.x ? endpoint.x : position.x);
+ y1 = (position.y > endpoint.y ? endpoint.y : position.y);
+ ortho = Vector(-1.0, 0);
+ angle = PI_OVER_2;
+ }
+
+ linePt1.x = linePt2.x = x1;
+ length = fabs(position.y - endpoint.y);
+ }
+ else if (dimensionType == DTLinearHorz)
+ {
+ if ((angle < PI_OVER_2) || (angle > PI3_OVER_2))
+ {
+ x1 = (position.x > endpoint.x ? position.x : endpoint.x);
+ y1 = (position.y > endpoint.y ? position.y : endpoint.y);
+ ortho = Vector(0, 1.0);
+ angle = 0;
+ }
+ else
+ {
+ x1 = (position.x > endpoint.x ? endpoint.x : position.x);
+ y1 = (position.y > endpoint.y ? endpoint.y : position.y);
+ ortho = Vector(0, -1.0);
+ angle = PI;
+ }
+
+ linePt1.y = linePt2.y = y1;
+ length = fabs(position.x - endpoint.x);
+ }
+ else if (dimensionType == DTLinear)
+ {
+ angle = Vector(linePt1, linePt2).Angle();
+ ortho = Vector::Normal(linePt1, linePt2);
+ length = v.Magnitude();
+ }
+
+ unit = Vector(linePt1, linePt2).Unit();
+// angle = Vector(linePt1, linePt2).Angle();
+// ortho = Vector::Normal(linePt1, linePt2);
+
+ Point p1 = linePt1 + (ortho * 10.0 * size);
+ Point p2 = linePt2 + (ortho * 10.0 * size);
+ Point p3 = linePt1 + (ortho * 16.0 * size);
+ Point p4 = linePt2 + (ortho * 16.0 * size);
+ Point p5 = position + (ortho * 4.0 * size);
+ Point p6 = endpoint + (ortho * 4.0 * size);
+#endif