[Qt-interest] trying to rotate ellipse
caius ligarius
caius9090 at gmail.com
Fri Mar 18 20:28:25 CET 2011
Hi I am trying to rotate and ellipse using qpainter rotate fucntion but
doesn't seem to work. Here is the code I use-
angle: ellipse orientation(0 to 360 degrees)
cenX, cenY: ellipse centre x,y
mjAxis, minAxis: major and minor axis of ellipse
QPen p;
p.setColor(color);
p.setWidth(2);
painter.setPen(p);
painter.drawEllipse(QPoint(cenX, cenY), majAxis, minAxis);
painter.rotate(angle);
painter.restore();
It draws ellipse but doesn't rotate it by "angle" degrees, any ideas?
Thanks,
Caius
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110318/925e4e11/attachment.html
More information about the Qt-interest-old
mailing list