KisPainter::paintPolygon used in paintops
lukast.dev at gmail.com
Fri Mar 13 11:49:32 CET 2009
I'm using paintPolygon in dynabrush and in spray.
For paintops it has one disadvantage. It is really slow.
I made callgrind log  where I use it in modified spray .
To speed it up about of 4%, line 728 in kis_painter:
KisPaintDeviceSP polygon = new KisPaintDevice(d->device->colorSpace(),
Why is string used? When I call paintPolygon in paintop, it is called e.g. 600
times in a stroke. Creating QString is quit slow. Is that string really
needed? What is its purpose? Could we use e.g. int for id, if it is id?
That method create a lot of objects like KisSelection,QImage, QPainter, QColor
What would be the solution for paintops?
Made own class for paintPolygon? Or optimalize paintPolygon somehow in
KisPainter (I don't have idea how to cache created objects in KisPainter :( )?
I use paintPolygon for painting shapes like filled aliased circle,
More information about the kimageshop