1 Attachment(s)
QPainter::drawEllipse and QTransform strange behaviour
Hi there,
i'm writing an application that should display a pie chart. So I used QPainter::drawEllipse and because it should look a bit more professional, i used QTransform::rotate (as you can see in the code). And then i get this strange result that you can see in the attachment (well, it was difficult to descripe).
What am i doing wrong?
Platform: Kubuntu 10.10, KDE 4.6; Qt 4.7
Attachment 6053
Code:
Code:
int h = height();
int w = width();
h = qMin(h,w)/2;
w = qMin(h,w)/2;
QTransform trans;
trans.rotate(-30,Qt::XAxis);
painter->setTransform(trans);
painter
->setRenderHint
(QPainter::Antialiasing,
true);
painter->setPen(color);
painter
->setBrush
(QBrush(color
));
painter->drawEllipse(200,200,200,200);