Hello,

I'm porting a QPainter-based code (written in absolute coordinates) to Qwt plot item. Normally the porting consists of transforming the coordinates using QwtScaleMap::transform() and using QwtPainter's static draw*() functions. But the original code uses QPainter::rotate() which really screws it all up and gives some really strange (and inexplicable) results.

For example,
Qt Code:
  1. for(int i=0; i<50; i++) {
  2. painter->save();
  3. painter->rotate(-90 - i*7.2);
  4. QwtPainter::drawText(painter, QwtScaleMap::transform(xMap, yMap, QRectF(-14,-595,100,100)),
  5. Qt::AlignLeft | Qt::AlignBottom, QString::number);
  6. painter->restore();
  7. }
To copy to clipboard, switch view to plain text mode 
Basically, what it does (in the original) is that it draw the numbers radially around a circle (think numbers around a dial).

I can use a separate QTransform object, rotate it and map that rectangle to it, giving me the text approximately where I want it. But, it's still off enough to be bad, and the text itself is not rotated (and I really need that).

Is there a way to make the painter rotation work with Qwt? Or maybe draw the rotated text some other way?

Thanks in advance!
Alexander