Hello,
I create a QBrush with a TexturePattern and set a pixmap like this:
The results is below, ie the image left corner is in the (about) middle of the QRect, so what did I miss?Code:
painter.fillRect(r, this->brush);
Printable View
Hello,
I create a QBrush with a TexturePattern and set a pixmap like this:
The results is below, ie the image left corner is in the (about) middle of the QRect, so what did I miss?Code:
painter.fillRect(r, this->brush);
Are you sure you didn't mean for your QRect to be:
Hmmmm, it turns out that it works!
So let me try to understand how it works: the pixmap is actually mapped not on the QRect itself but rather on the whole canvas, in a tile manner, and the QRect acts as a window on this tiled canvas, right?
So my question is now: how to map the pixmap on the QRect, whatever location this QRect is drawn at?