Bug 384143 - HiPDI: freehand line in presentation mode is blocky
Summary: HiPDI: freehand line in presentation mode is blocky
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 1.2.70
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-29 15:10 UTC by Oliver Sander
Modified: 2019-06-22 23:32 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 1.8.0
Sentry Crash Report:


Attachments
screenshot showing the problem (17.82 KB, image/png)
2017-08-29 15:10 UTC, Oliver Sander
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Sander 2017-08-29 15:10:26 UTC
Created attachment 107579 [details]
screenshot showing the problem

Have a look at the attached screenshot.  The word 'annotation' is a freehand annotation; it has been drawn in regular page view mode.  The word 'presentation' has been drawn in presentation mode.  Note how it is of much worse quality.

This screenshot was taken with the current gsoc_2017_hidpi branch.  On git master, both words look equally bad.  I have QT_SCREEN_SCALE_FACTORS set to 1.5.
Comment 1 Oliver Sander 2019-06-15 21:55:36 UTC
Patch at https://phabricator.kde.org/D21836
Comment 2 Oliver Sander 2019-06-22 19:55:40 UTC
Git commit 19f22098e67dba5d06df170b32b9074b17b1ae6e by Oliver Sander.
Committed on 22/06/2019 at 19:55.
Pushed by sander into branch 'master'.

Mind the devicePixelRatio when drawing on-screen in presentation mode

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) a few integer types used for non-integer coordinates
b) the intermediate use of a QPixmap without the correct
   devicePixelRatio

Additionally, this patch uses a QPainterPath to draw the path,
rather than a sequence of individual lines.  This improves
the line quality a tiny bit, because the lines are properly
joined.

Differential Revision: https://phabricator.kde.org/D21836

M  +4    -5    ui/annotationtools.cpp
M  +11   -5    ui/presentationwidget.cpp

https://invent.kde.org/kde/okular/commit/19f22098e67dba5d06df170b32b9074b17b1ae6e