Skip to content

Make the halftone filter correctly handle generators that need resources snapshot

Deif Lou requested to merge deiflou/krita:deiflou/fix_halftone_pattern into master

This mr tries to make the halftone filter work well with generators that need to deal with resources (pattern generator).

The only way I could make it work was making the KisFilterConfiguration::cloneWithResourcesSnapshot virtual. I don't know if that is the correct way, but the filter needs to create the configurations for the generators with cloneWithResourcesSnapshot somehow.

This also fixes two small issues in the pattern generator.

And lastly, it seems that the pattern generator still doesn't work well if used with the halftone filter in the filter brush. It behaves as if it wasn't able to use the selected pattern (similar as the normal use of the filter before this patch). But I'm not sure how to fix that. If anyone does, tell me and I'll make another commit with the fix.

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