- double absAngle = (Vector(oldPoint - position).Angle()) * RADIANS_TO_DEGREES;
- double relAngle = (startAngle >= oldAngle ? startAngle - oldAngle :
- startAngle - oldAngle + (2.0 * PI)) * RADIANS_TO_DEGREES;
-
- QString text;
-
- if (hitHandle2)
- {
- text = QObject::tr("Abs ") + QChar(0x2221) + ": %1" + QChar(0x00B0)
- + QObject::tr("\nRel ") + QChar(0x2221) + ": %2" + QChar(0x00B0);
- text = text.arg(absAngle, 0, 'd', 4).arg(relAngle, 0, 'd', 4);
- }
- else if (hitHandle3)
- {
- text = QObject::tr("Abs ") + QChar(0x2221) + ": %1" + QChar(0x00B0)
- + QObject::tr("\nSpan: %2") + QChar(0x00B0);
- text = text.arg(absAngle, 0, 'd', 4).arg(angleSpan * RADIANS_TO_DEGREES, 0, 'd', 4);
- }
- else if (hitHandle4)
- {
- text = QObject::tr("Radius: %1\nScale: %2%");
- text = text.arg(radius, 0, 'd', 4).arg(radius / oldRadius * 100.0, 0, 'd', 0);
- }
-
- pen = QPen(QColor(0x00, 0xFF, 0x00), 1.0, Qt::SolidLine);
- painter->SetPen(pen);
- painter->SetBrush(QBrush(QColor(0x40, 0xFF, 0x40, 0x9F)));
- QRectF textRect(10.0, 10.0, 270.0, 70.0); // x, y, w, h
- painter->DrawRoundedRect(textRect, 7.0, 7.0);
-
- textRect.setLeft(textRect.left() + 14);
- painter->SetFont(*Object::font);
-// pen = QPen(QColor(0xDF, 0x5F, 0x00), 1.0, Qt::SolidLine);
- pen = QPen(QColor(0x00, 0x5F, 0xDF));
+ // If we rotating, we draw a guideline showing the angle we're
+ // moving it from.
+ Point p3(cos(oldAngle), sin(oldAngle));
+ Vector oldLine = (p3 * (radius * 1.25)) + position;
+ pen = QPen(QColor(0x80, 0x80, 0x80), 1.0, Qt::DashLine);