- 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);
- }
-
- painter->setPen(QPen(QColor(0x00, 0xFF, 0x00), 1.0, Qt::SolidLine));
- 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);
-
- textRect.setLeft(textRect.left() + 14);
- painter->setFont(*Object::font);
- painter->setPen(QPen(QColor(0xDF, 0x5F, 0x00), 1.0, Qt::SolidLine));
- painter->drawText(textRect, Qt::AlignVCenter, text);
- painter->restore();
+ 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 (draggingEdge)
+ {
+ text = QObject::tr("Radius: %1\nScale: %2%");
+ text = text.arg(radius, 0, 'd', 4).arg(radius / oldRadius * 100.0, 0, 'd', 0);