Created attachment 133245 [details] [review] Patch that implements ArthurOutputDev::updateBlendMode The Arthur backend renders highlight annotations wrongly. The yellow rectangles are simply rendered on top of the highlighted text, hiding that text completely. The obvious explanation was that the updateBlendMode method is not implemented in ArthurOutputDev. I therefore prepared a patch that implements that method. It is simple and self-contained. Full disclosure: I actually took the implementation from the much larger patch that Mihai Niculescu posted to the mailing list in https://lists.freedesktop.org/archives/poppler/2013-June/010370.html That's why the patch contains Mihai's name in the copyright list. Only, it doesn't solve the problem: With it, the yellow rectangles still hide the text. And I don't understand why this is. When the ArthurOutputDev::fill method that draws the yellow rectangle is called, the blend mode is gfxBlendNormal, which I suppose means "draw right on top of it". I need a hint here. What is the mechanism that allows me to see the highlighted text through the rectangle, if it isn't the blend mode? It doesn't seem to be opacity, either.
Created attachment 133246 [details] Test document: a short text that is partially highlighted
If you want i can commit this, but honestly i don't have time to sink on ArthurOutputDev trying to help you
Created attachment 134934 [details] New test file Updated the test file. For some reason I don't see a highlight at all any more in the old one.
Created attachment 135143 [details] [review] Patch that implements ArthurOutputDev::updateBlendMode Rebased the patch, and removed a stray debugging output.
I finally figured out how to make Arthur render highlight annotations properly. (Thanks to Adrian for his advice---I should have listened earlier.) These annotations need support for transparency groups. My implementation comes as three separate patches: 1) The implementation of updateBlendMode. Please commit this, it is definitely needed. 2) A patch that replaces the single QPainter object by a stack of QPainters. That one is a bit invasive, that's why I'm submitting it separately. All references to the current painter are now m_painter.top() rather than simple m_painter. Having a getter method for that may be nice---I am undecided. 3) The actual implementations of {begin|end|paint}TransparenceGroup. These are short and rudimentary. Transparency groups can do much more than just highlights, but that has to wait until later. Thanks for your review.
Created attachment 135144 [details] [review] Patch that replaces the QPainter by a stack of QPainters
Created attachment 135145 [details] [review] Patch implementing rudimentary transparency group support
pushed
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.