Hi,
I have a QGraphicsScene and I wish to draw some text on the foreground, a repeated string, but randomly spread over the entire scene (like a watermark). I create a QBrush with a Qpixmap as below....
pix.fill(Qt::transparent);
paint.setPen("black");
paint.setOpacity(0.75);
paint.drawText(10,10,"THISTEXT");
brush.setTexture(pix);
QBrush brush;
QPixmap pix(200,70);
pix.fill(Qt::transparent);
QPainter paint(&pix);
paint.setPen("black");
paint.setOpacity(0.75);
paint.drawText(10,10,"THISTEXT");
brush.setTexture(pix);
To copy to clipboard, switch view to plain text mode
What happens is that if I set this brush as my foregroundbrush for the scene, THISTEXT appears in rows and columns as foreground. I would like this to be less organised. THISTEXT should occur frequently and in a non-ordered way. How can I do this? Is there another way to add a text watermark to the foreground of a QGraphicsScene (QT4)?
Thanx!
Ellen
Bookmarks