Skip to content

Filter brush improvements

This makes some fixes to the filter brush engine:

  1. The filters were not initialized with a default configuration when created. That made the ui and parameters behave odd in some filters (halftone for example) and just crash in others (index colors). That is fixed in the first commit.
  2. Some filters need to have into account the coordinates relative to the canvas. Maybe te most evident case is the halftone filter which uses the generators. The generators are rendered in a way that they need to know the position in the image, for example to be able to tile some pattern. But the same is true for other filters like pixelize, random noise or random pick. The second commit just tries to fix that. Now one can create a functional pixelize or halftone brush for example.
  3. The above changes just exposed some flaws that ended up producing crashes on the gradient generator and the gradient map filter that I made/improved. That is fixed in the third commit.

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 Deif Lou

Merge request reports