Summary: | [frameworks] Line width of freehand annotation is resolution dependent | ||
---|---|---|---|
Product: | [Applications] okular | Reporter: | Oliver Sander <oliver.sander> |
Component: | general | Assignee: | Okular developers <okular-devel> |
Status: | RESOLVED WORKSFORME | ||
Severity: | minor | CC: | aacid, cfeck, justin.zobel |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Oliver Sander
2016-10-06 20:56:46 UTC
Friendly ping :-) On the initial drawing, the tool uses the configured size as a screen pen width in pixels. When the annotation is added to the document, it is rendered according to the zoom level. To fix it, you would have to take into account the current document zoom in the code you mentioned. Thanks for the hint. I played around with this a little. It seems that the initial drawing code is buggier than I though. Simply multiplying the zoom factor to the pen width doesn't cut it. You can witness the problems without patching okular: go to Options -> set up Okular -> Annotations -> freehand --> edit and set the line width to something large, like 20. When I do this, the drawing becomes very blocky, the pen width is not constant anymore, and sometimes parts of what I draw are not shown. Any ideas? I may look some more into this, but currently I am out of ideas. is this really frameworks only? No, as I learned eventually this happens on master, too. Actually, on master it is worse, because there, the line-while-you-draw always has width 1, irrespective of what the line width settings say. Presumably that's because in annotationtools.cpp:153 it simply says const SmoothPath path( points, QPen(m_engineColor, 1) ); (the '1' is the width). (In reply to Oliver Sander from comment #5) > No, as I learned eventually this happens on master, too. > > Actually, on master it is worse, because there, the line-while-you-draw > always has width 1, irrespective of what the line width settings say. > Presumably that's because in annotationtools.cpp:153 it simply says > > const SmoothPath path( points, QPen(m_engineColor, 1) ); > > (the '1' is the width). Oliver were you able to identify and resolve this issue within the code? Or can you confirm if this issue is still occurring or if this bug report can be marked as resolved, thanks. (In reply to Oliver Sander from comment #7) > What I said in comment 5 is still valid. Sorry I meant have you found a solution to the issue where you could provide a patch (merge request) to fix it. Sorry, but I never found the time to try that. (In reply to Oliver Sander from comment #9) > Sorry, but I never found the time to try that. I'm going to set this bug to needsinfo as you were the only one to report this issue. If you can, please test it, if not please let us know so we can close this bug report. Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone! This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone! |