D21836: Mind the devicePixelRatio when drawing on-screen in presentation mode

Oliver Sander noreply at phabricator.kde.org
Sat Jun 15 22:54:10 BST 2019


sander created this revision.
sander added a reviewer: Okular.
Herald added a project: Okular.
Herald added a subscriber: okular-devel.
sander requested review of this revision.

REVISION SUMMARY
  Previously, when using a screen scaling factor larger than 1, the drawings by mouse or stylus in presentation mode were slightly blocky. The underlying cause was:
  
  - a few integer types used for coordinates that were non-integer
  - the intermediate use of a QPixmap without the correct devicePixelRatio.
  
  Before:
  F6894610: presentation-mode-drawing-blocky.png <https://phabricator.kde.org/F6894610>
  
  After:
  F6894611: presentation-mode-drawing-smooth.png <https://phabricator.kde.org/F6894611>

TEST PLAN
  1. Set QT_SCREEN_SCALE_FACTORS to something larger than 1, e.g., 1.5.
  2. Open a pdf file
  3. Switch to presentation mode
  4. Choose a color in the toolbar near the top of the screen
  5. Draw something with the mouse
  6. Without the patch the drawing is slightly blocky, with the patch it isn't.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D21836

AFFECTED FILES
  ui/annotationtools.cpp
  ui/presentationwidget.cpp

To: sander, #okular
Cc: okular-devel, joaonetto, tfella, ngraham, darcyshen, aacid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20190615/912e6153/attachment-0001.html>


More information about the Okular-devel mailing list