Simplify the drawing of buffered highlight rectangles

Review Request #130214 - Created Aug. 3, 2017 and submitted

Information
Oliver Sander
okular
master
Reviewers
okular

Previously, they were drawn by modifying individual pixels of the QImage. With this patch we simply use a QPainter. That makes the code a lot shorter.

This follows a suggestion from https://blog.hetzenecker.me/2017-06-30-gsoc-kdegraphics-okular/

The code that is removed by this patch is the sole consumer of the has_alpha variable. Consequently the compiler now warns about an unused variable. Should I send another patch removing that variable?

Tested with pdf and odt documents, and different text colors, and I could not find any functional difference. In particular, testing with pdf and odt makes sure that both branches of the if(has_alpha) conditional are tested.

Issues

  • 2
  • 0
  • 0
  • 2
Description From Last Updated
space after , Albert Astals Cid Albert Astals Cid
Remove the has_alpha variable? Albert Astals Cid Albert Astals Cid
Albert Astals Cid
Albert Astals Cid
Oliver Sander
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 024d25cdeca11f9cd012b4e5099b1b4cb91826de by Oliver Sander to branch master.
Loading...