- // If we're rotating or setting the span, draw an information panel
- // showing both absolute and relative angles being set.
- if ((hitHandle2 || hitHandle3 || hitHandle4) && objectWasDragged)
- {
- double absAngle = (Vector(oldPoint - position).Angle()) * RADIANS_TO_DEGREES;
- double relAngle = (startAngle >= oldAngle ? startAngle - oldAngle :
- startAngle - oldAngle + (2.0 * PI)) * RADIANS_TO_DEGREES;
-
-// painter->save();
-//close, but no cigar. we need to "invert" our transformation to make this work properly
-// return QPoint(-offsetX + x, (size().height() - (-offsetY + y)) * +1.0);
-// painter->translate(0, viewportHeight);
-// painter->scale(1.0, -1.0);
-// Give up for now; just paint the info panel in the upper left corner of the screen
-// painter->resetTransform();
- 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, 220.0, 60.0); // x, y, w, h
- painter->DrawRoundedRect(textRect, 7.0, 7.0);