Hi, all!<br><br>I guess this paintop can be greatly optimized. When you move your mouse, the only region changed is contained inside the borders of the rectangle formed by the points:<br><br>(base_point, prev_point, current_point),<br>
<br>where base_point - is the point, where the stroke has been started,<br>current_point - the point passed from mouseMoveEvent,<br>prev_point - the point passed from the previous mouseMoveEvent.<br><br><br>So we needn&#39;t to repaint the whole stroke. We need to update this triangle only. Lukas said, that the generation of the polygon is done using QPainter, but i think this is hardly a problem. We can generate the whole mask with a QPainter, then split the triangle into a couple of rectangles. Then we have to copy these only these few rectangles into KisFixedPaintDevice, paint them onto the destination device, and call setDirty for them. I think this will be much faster and efficient.<br clear="all">
<br>-- <br>Dmitry Kazakov<br>