[okular] [Bug 370217] New: [frameworks] Line width of freehand annotation is resolution dependent
Oliver Sander via KDE Bugzilla
bugzilla_noreply at kde.org
Thu Oct 6 20:56:46 UTC 2016
https://bugs.kde.org/show_bug.cgi?id=370217
Bug ID: 370217
Summary: [frameworks] Line width of freehand annotation is
resolution dependent
Product: okular
Version: unspecified
Platform: Compiled Sources
OS: Linux
Status: UNCONFIRMED
Severity: minor
Priority: NOR
Component: general
Assignee: okular-devel at kde.org
Reporter: oliver.sander at tu-dresden.de
Try drawing a freehand annotation on a pdf document (F6 and then the third icon
from the top). You will see it appear while you draw. Then as you lift off
the pen / release the mouse button, it will disappear very briefly, and then
reappear. The bug is that the line also changes its width at the same moment.
Here is what I think is happening: the line is drawn by two different parts of
the code before and after you release the mouse button. While you draw, the
line is drawn by a QPen object constructed in annotationtools.cpp:158. The pen
width is
const qreal penWidth = m_annotElement.attribute( QStringLiteral("width"),
QStringLiteral("1.0") ).toDouble();
from three lines above. Once the mouse button is released, the line is redrawn
by code somewhere else, and I haven't been able to find where. I don't know
how the pen width is computed there.
I played around with my screen resolution and it seems that the problem is that
the first drawing code does not take screen resolution into account, while the
second one does. I am interested in debugging this further, but I need some
help: where is the code that draws the freehand annotation after the initial
drawing is completed? I suppose that comparing the two will explain why the
line widths differ.
Reproducible: Always
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Okular-devel
mailing list