[Qt-interest] Aligning QBrush texture

Alessandro Portale alessandro.portale at nokia.com
Wed Sep 1 19:41:56 CEST 2010


On 9/1/2010 7:18 PM, ext Josh wrote:
> ... Any hints on how to do this? I was thinking about translating
> the painter, but I think this would make my rectangle draw at a a
> different location.

You can tweak the brush origin with QPainter::setBrushOrigin()
    http://doc.qt.nokia.com/latest/qpainter.html#setBrushOrigin

...and I just saw that QBrush has a transform...
    http://doc.qt.nokia.com/latest/qbrush.html#setTransform
Not sure if that will do what you need, though. Didn't test it.



More information about the Qt-interest-old mailing list