PDA

View Full Version : Rotating QGraphicsTextItem



meazza
2nd August 2011, 08:41
Hello peeps.

Got a quick question. I am trying to rotate a subclass of QGraphicsTextItem. And the thing is when I rotate the text it gets deformed. (Se attachments).

In my QGraphicsView these flags are set.

view->setRenderHints(QPainter::SmoothPixmapTransform | QPainter::Antialiasing | QPainter::TextAntialiasing);.

The way I rotate the item is simple by calling the QGraphicsItem::rotate.

Dont really know what else I can do.

szisziszilvi
2nd August 2011, 10:23
is it not simply because you cannot draw anything with the set of a pixel grid? 180 degrees, if it is nice then this is the soulition.

meazza
2nd August 2011, 10:34
is it not simply because you cannot draw anything with the set of a pixel grid? 180 degrees, if it is nice then this is the soulition.

What? Sorry but didn't understand a thing here.

szisziszilvi
2nd August 2011, 11:37
if you have a line with 1 pixel width, than it will be nice horizontally, it will be nice vertically, but it will be ugly at any other angel because the pixel grid on that you draw is made of squares. that is the raster image. see the border of the quote bulb, it is nice at the horisontal and vertical parts but not really the best at the corners.

meazza
2nd August 2011, 12:11
Okej, understand that now. But isn't antialiasing supposed to fix the ugly corners?