- Point p9 = ((position + endpoint) / 2.0) + (orthogonal * 14.0)
- + (unit * 7.0);
-
- Point p10 = p9 + (orthogonal * -7.0);
- Point p11 = p10 + (unit * 7.0);
- Point p12 = p11 + (orthogonal * 7.0);
- Point p13 = p12 + (unit * -7.0);
- painter->DrawLine(p10, p11);
- painter->DrawLine(p11, p12);
- painter->DrawLine(p12, p13);
- painter->DrawLine(p13, p10);
+ Point hp1 = (p1 + p2) / 2.0;
+ Point hp2 = (p1 + hp1) / 2.0;
+ Point hp3 = (hp1 + p2) / 2.0;
+
+ if (hitFlipSwitch)
+ {
+ painter->SetPen(QPen(Qt::magenta, 1.0, Qt::SolidLine));
+ painter->SetBrush(QBrush(QColor(Qt::magenta)));
+ painter->DrawArrowHandle(hp1, ortho.Angle() + PI);
+ painter->SetPen(QPen(Qt::magenta, 2.0, Qt::DotLine));
+ }
+
+ painter->DrawHandle(hp1);
+ painter->SetPen(QPen(Qt::blue, 1.0 * Painter::zoom * size, Qt::SolidLine));
+
+ if (hitChangeSwitch1)
+ {
+ painter->SetPen(QPen(Qt::magenta, 1.0, Qt::SolidLine));
+ painter->SetBrush(QBrush(QColor(Qt::magenta)));
+ painter->DrawArrowToLineHandle(hp2, (dimensionType == DTLinearVert ? v.Angle() - PI_OVER_2 : (v.Angle() < PI ? PI : 0)));
+ painter->SetPen(QPen(Qt::magenta, 2.0, Qt::DotLine));
+ }
+
+ painter->DrawHandle(hp2);
+ painter->SetPen(QPen(Qt::blue, 1.0 * Painter::zoom * size, Qt::SolidLine));
+
+ if (hitChangeSwitch2)
+ {
+ painter->SetPen(QPen(Qt::magenta, 1.0, Qt::SolidLine));
+ painter->SetBrush(QBrush(QColor(Qt::magenta)));
+ painter->DrawArrowToLineHandle(hp3, (dimensionType == DTLinearHorz ? v.Angle() - PI_OVER_2 : (v.Angle() > PI_OVER_2 && v.Angle() < PI3_OVER_2 ? PI3_OVER_2 : PI_OVER_2)));
+ painter->SetPen(QPen(Qt::magenta, 2.0, Qt::DotLine));
+ }
+
+ painter->DrawHandle(hp3);