SUMMARY An object "Straight line" used for annotating is always semi-transparent and does not respect "Opacity" setting. STEPS TO REPRODUCE 1. Open any image file supported by Okular. 2. Press F6 to open "Review" toolbar. 3. Press 5 to activate "Straight line" tool. 4. Make two clicks with LMB on the image view to create a line. OBSERVED RESULT The line is semi-transparent, despite its "Opacity" is 100%. EXPECTED RESULT The line is opaque. SOFTWARE/OS VERSIONS openSUSE Leap 15.2 KDE Plasma Version: 5.18.5 KDE Frameworks Version: 5.71.0 Qt Version: 5.12.7
It works fine here. Could you attach an image in which you have such problem?
Created attachment 130685 [details] Screenshot fragment - 1600% zoom in Okular
There has ben some misunderstanding, i didn't ask for a screenshot of the problem . I asked for the file you're using to reproduce the problem.
Ah, interesting i can reproduce it now, if the line is black it works fine, so the line needs to be of a different color
I indeed wondered about this code. The PagePainter::draw...() methods, which are responsible for drawing internal annotations, are always called with composition mode “multiply”. They are indeed 100% opaque, but “multiply” is not what you are used to see. The problem with this is that they become completely invisible e. g. when “Invert colors” is activated on a .txt document, or the document is otherwise just dark. The correct composition modes would be: “soft light” for Highlighter annotations and simply “normal” for all other annotations. “Soft light” has potentially bad performance, so another option would be to choose “multiply” or “screen” depending on the document and color mode. I assume “multiply” just evolved from a time when only Highlighter annotations and documents with light background were relevant. Future developers probably just wondered about it and adopted it, because they thought it must have some reason.
Astals Cid from comment #4) > line needs to be of a different color I noticed this with default colour of my version, #ffe000. Now I see that with white it becomes invisible. Also reproducible with: - Polygon Not reproducible with: - Freehand line - Geometry (Ellipse tool creates this)
Git commit c171e5aecc1a38ed22c0c07a56b17eddc90ef67e by Albert Astals Cid. Committed on 06/08/2020 at 22:35. Pushed by aacid into branch 'master'. PagePainter: Don't draw Arrow/Line annotations with multipyl Otherwise they will be transparent when they shouldn't M +9 -9 ui/pagepainter.cpp M +1 -1 ui/pagepainter.h https://invent.kde.org/graphics/okular/commit/c171e5aecc1a38ed22c0c07a56b17eddc90ef67e
Git commit 389c7b0235fe762cda799ad4ce8bfbe710bef210 by Albert Astals Cid. Committed on 07/08/2020 at 22:33. Pushed by aacid into branch 'release/20.08'. PagePainter: Don't draw Arrow/Line annotations with multipyl Otherwise they will be transparent when they shouldn't M +9 -9 ui/pagepainter.cpp M +1 -1 ui/pagepainter.h https://invent.kde.org/graphics/okular/commit/389c7b0235fe762cda799ad4ce8bfbe710bef210
Git commit 3a331b782e14ffe0c24ffd324899312e27306790 by Albert Astals Cid. Committed on 07/08/2020 at 22:32. Pushed by aacid into branch 'master'. PagePainter: Don't draw Arrow/Line annotations with multipyl Otherwise they will be transparent when they shouldn't M +9 -9 ui/pagepainter.cpp M +1 -1 ui/pagepainter.h https://invent.kde.org/graphics/okular/commit/3a331b782e14ffe0c24ffd324899312e27306790