Skip to content

feat: multiplicative marker blending#1730

Draft
Kneemund wants to merge 4 commits into
flxzt:mainfrom
Kneemund:feat/marker-multiplicative-blending
Draft

feat: multiplicative marker blending#1730
Kneemund wants to merge 4 commits into
flxzt:mainfrom
Kneemund:feat/marker-multiplicative-blending

Conversation

@Kneemund

@Kneemund Kneemund commented Apr 7, 2026

Copy link
Copy Markdown
Collaborator

  • Adds multiplicative blending to the "Marker" pen.
  • Moves the highlighter stroke layer to the top.
  • Preserves layer information when copy-pasting strokes.
Bildschirmaufnahme_20260407_171820.webm

TODO

The SVGs that Cairo produces when multiplicative blending is involved seem to be very weird. Simplifying them using usvg breaks them, making them fully blank or black in all applications.

When skipping the simplification, the only applications I have that were able to correctly render them were a Chromium browser, GIMP and Inkscape (didn't work in LibreOffice, Gwenview, Firefox and Rnote). This also fixed Rnote PNG exports, so I guess librsvg can do it... sometimes?

Any help on this would be appreciated. Below is an example SVG (without simplification). I believe that this could be a dealbreaker for this PR as it seems like a Cairo bug, and Cairo is pretty much maintenance-only.

test

@Kneemund Kneemund marked this pull request as draft April 7, 2026 17:22
@Kneemund Kneemund force-pushed the feat/marker-multiplicative-blending branch from 976ecb0 to 15383de Compare April 18, 2026 18:50
@Kneemund Kneemund force-pushed the feat/marker-multiplicative-blending branch from 15383de to ebb01a4 Compare May 1, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an highlighter that also works on background pdf/images

1 participant