KDE: Week 8 recap
Quoting: Week 8 recap —
Since our main problem up to this point is to deal with the constant micro-pixel calls, we decided to discard all these < 1 pixel movements by filtering out distances of less than 1 pixel before they go down the pipeline in KisToolFreehandHelper::paint. Using m_d->history.last(), we can get the last called point and get the distance by comparing it to info.pos(). We are also going to check if the last used paint information is the same as the one outputted last so we don't get instances where paintBezierSegment gets called on the same pixels multiple times keeping the process simple and cleaner.
Because of how Krita sets up line drawings, by having fewer of these small super rapid calls from within the pixels, we call drawLine less frequently, allowing drawLine to naturally draw pixel-perfect lines when given a diagonal start and end point.