<div class="gmail_quote">On Tue, Sep 29, 2009 at 1:45 PM, Boudewijn Rempt <span dir="ltr"><<a href="mailto:boud@valdyas.org" target="_blank">boud@valdyas.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Tuesday 29 September 2009, <a href="mailto:LukasT.dev@gmail.com" target="_blank">LukasT.dev@gmail.com</a> wrote:<br>
<br>
...<br>
<br>
I got a valgrind log for you now --<br>
<a href="http://www.valdyas.org/%7Eboud/splatter.callgrind" target="_blank">http://www.valdyas.org/~boud/splatter.callgrind</a>. This shows that the biggests<br>
issue is indeed exactBounds(), but you might be able to find other issues.<font color="#888888"><br>
</font></blockquote></div><br>Some other ideas:<br><br>I'm not sure if QImage::pixel suffers from the same slowness as setPixel, but it might be worth to try using QImage scanline instead. Same with QPainter::fillRect vs QImage::fill.<br>
<br>Adapt the size of the QImage to the path. It isn't needed to create a 256x256 QImage if you are just painting a 10 pixel circle.<br><br>Combine several paths into one QPainterPath. No idea, if that works with the spray tool but it would probably help a lot if you could group the circles etc. in in qpainterpath before using fillPainterPath.<br>