Skip to content

Fix color halo around layer styles on layers with transparent pixels

This patch is a fix for bug https://bugs.kde.org/show_bug.cgi?id=412283 (and all the duplicates). The patch also fixed the width of the "Stroke" layer style, though it doesn't fix its blending.

Bascially, it changes blending algorithm of Overlay*, Inner Shadow, Inner Glow and Satin layer styles. Now when activating these styles with weird blending modes, like "Linear Dodge" or "Multiply", there will be no color fringes arour the layers.

Test Plan

Testcase 1:

  1. Create a layer like in the bugreport
  2. Activate either of the styles: Overlay*, Inner Shadow, Inner Glow and Satin
  3. Change blending mode. No color artifacts should appear on semi-transparent areas

Testcase 2:

  1. Repeat the steps with weird, layers. Like, Vector Layer or File Layer.

Testcase 3:

  1. Activate "Stroke" layer style and check if it looks okay on small sizes, like 1-5px.

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 Dmitry Kazakov

Merge request reports