[Qt-interest] Rotating a text without rotating the world
Andrea Franceschini
therealmorpheu5 at gmail.com
Fri Mar 27 16:44:00 CET 2009
Hello all,
I have to paint a string using QPainter but I'd like to do it without
applying transforms to the painter itself. The situation is that I
have to paint this string inside a bounding polygon (say a rectangle).
Of course I can rotate the polygon via QMatrix, then translate it to
the proper location and paint it via QPainter::drawPolygon. But there
seems to be no way to rotate the string according to the polygon (for
example if the polygon is rotated 30° ccw, the string should take the
same rotation) and put it at the same location of the polygon, other
than going for the world matrix, which is more complicated than how
I'd like my users to have to deal with -- and even for me now :)
--
Andrea
More information about the Qt-interest-old
mailing list