Skip to content

WIP: Add screentone generator

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

This is an implementation of screentone filling as a generator. It allows to fill areas with different dot/line patterns, which added to the capability of the generator layers of being painted to set a mask on it, let's the user to reproduce the classical screentone process which consisted of cutting transparent sheets with dots and stick them in the drawing (example video 1, example video 2).

NOTE: This MR also contains a fix that prevents KisWdgGenerator from calling setConfiguration multiple times (#74876f46).

The patterns are generated completelly procedurally, so the user can change the configuration at any time, and they are fast.

The generator has options to change the pattern, the foreground/background colors and opacity and the geometric transformations (position, size, shear and rotation).

Here are some example images and the corresponding test files used to create them (open with a build that has the screentone generator):

screentone-test-01.kra ~ This is a file that uses the generator as the traditional screentone sheets.

screentone-test-01

screentone-test-02.kra ~ This file uses the screentone generator to make a halftone effect (mixed with blending modes and levels filter) and shows the potential of the generators to be used as the base to make the texture of a halftone filter.

screentone-test-02

Test Plan

  1. Build krita with this patch
  2. Open krita and open one of the images provided in this message
  3. Open the layer options of the screentone generator layers and play

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