Skip to content

Rewrite "Auto Precision" option

The patch basically removes old implementation of auto-brush and substitutes it with simple euristics:

  1. If brush size is below 30px, use full precision (level 5)
  2. If brush has a texture, scatter, mirror, rotation or airbrush option, then disable subpixel precision (level 3)

The euristics are chosen this way to make sure that all the older presets work fine. The problem is that auto-precision option did nothing for several previous versions of Krita (it just returned precision 5 all the time), therefore brush creators bascially couldn't configure it properly. The new implementation makes sure that most of the presets with auto-precision will still have precision level 5, like it used to be before auto-precision "fix".

The patch does not add any UI strings (only removes a few). So it is safe to be backported to 4.2.

BUG:413085

Test Plan

  1. Check painting with "Basic-5 Size" on different sizes. No artifacts should appear.
  2. Check painting with "Basic-2 Opacity" on different sizes. No bents, nor artifacts should appear.
  3. Check "Screentones Regular" preset on big sizes (>500). With "Auto" option on it should paint a bit faster than with precision explicitly set to level 5

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.

Merge request reports