Skip to content

Fix weird offset on 1px lines 407405

Ivan Yossi requested to merge ivany/krita:pixelPaint_offset into master

We use DDA algorythm on 1px strokes. this removes the DDA usage on this case. According to dmitry this is not done for speed reasons. And on line stroke testings this does not alter the expected 1px line the 1px preset line. However it helps in.

  • Create perfect pixel lines
  • Create really circular lines

Other posible solutions is to refactor the DDA algorithm as it could be wrong (havent tested in deep). However before refactoring I open this for review as it is. since it may or may no t be necessary to handle an specifyc case. (git blame could not fine the commit that introduced this 1px case)

Test Plan

(Tell us how to test the changes you made.)

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
Edited by Ivan Yossi

Merge request reports