]> git.lyx.org Git - features.git/commit
Fix and simplify computation of painter monochrome mode
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sat, 11 Jul 2020 21:56:48 +0000 (23:56 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sat, 11 Jul 2020 22:01:46 +0000 (00:01 +0200)
commit77036f543488b534dbe35466049083b348d8914f
tree42447f224556b227b1394e21492d5790e2f701a4
parentdf2234f18deb4021ecadce24001c4b6b3e6ee374
Fix and simplify computation of painter monochrome mode

The old code in GuiPainter::filterColor did not work. Tricks with
colors should take place in HSV space, not RGB IMO.

Replace the code with a simpler one which maps the grayscale value
of the original color on the blend color. It works nin the case where
original color is red, but might not work as well when blend color is
not black. Time will tell.

Fixes bug #11904.
src/frontends/NullPainter.h
src/frontends/Painter.h
src/frontends/qt/GuiPainter.cpp
src/frontends/qt/GuiPainter.h
src/mathed/InsetMathMacro.cpp
src/mathed/InsetMathMacroTemplate.cpp