[Okular-devel] Review Request 114153: An Idea: Render PDF annotations internally while they are being moved

Fabio D'Urso fabiodurso at hotmail.it
Wed Nov 27 20:12:30 UTC 2013



> On Nov. 27, 2013, 7:49 p.m., Fabio D'Urso wrote:
> > Rendering differences (that I judged ugly) were the reason why I chose to go the dashed outline route.
> 
> Jon Mease wrote:
>     Yeah, that makes sense. How do you feel about my idea above of only using this approach for the "geometric" annotations?  To my eye the rendering looks almost identical.

It works for me. IIRC, however, there are some differences with straight lines having non-null "leader lines" (ie those optional perpendicular segments at the endings), maybe you can change Okular's rendering to match Poppler's.
BTW, the long-term fix I have in mind is to patch Poppler to render annotations separately to different pixmaps than the rest of the page, so we can really paint them on top of the page inexpensively. But this is lots of work and I have no time to do that at the moment :( so yeah, it works for me! :D


- Fabio


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/114153/#review44612
-----------------------------------------------------------


On Nov. 27, 2013, 3:22 p.m., Jon Mease wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/114153/
> -----------------------------------------------------------
> 
> (Updated Nov. 27, 2013, 3:22 p.m.)
> 
> 
> Review request for Okular.
> 
> 
> Repository: okular
> 
> 
> Description
> -------
> 
> Unlike in other document formats, the annotations on PDF documents are rendered by the Poppler back-end along with the document itself.  Because this document rendering step is expensive we don't render annotations on PDF documents while the annotations are being moved (With Ctrl+Left click drag).  Instead of rendering the annotation itself during the move, we render a dashed outline of the annotation.  For non-PDF document types the annotations are rendered by Okular on top of the document, and so there is no large performance penalty in rendering the annotation smoothly as it is moved.  I find the aesthetic experience of moving annotations on non-PDF to be much more pleasing.
> 
> In this small patch updates the paintCroppedPageOnPainter() function draw external annotations using the internal annotation drawing logic while the annotation is being moved.  It also removes the dashed annotation outline during the move.  With this small change the experience of moving an annotation on a PDF now matches that of moving an annotation on the other document formats.
> 
> Two small oddities:  The rendering of the popup note icon differs between the Poppler back-end and Okular's internal rendering so the icon changes form while being moved and then changes back after being dropped.  The rendering of fonts on inline notes between the Poppler back-end and Okular's internal rendering seems to differ in some cases so as you move an inline note the font changes.
> 
> Thoughts?
> 
> 
> Diffs
> -----
> 
>   ui/pagepainter.cpp d5d9c3e 
> 
> Diff: http://git.reviewboard.kde.org/r/114153/diff/
> 
> 
> Testing
> -------
> 
> Tested drawing and moving each of the annotation types on a PDF document and on a DVI document. The behavior on the DVI document is unchanged. I find the behavior on the PDF document to be more natural.
> 
> 
> Thanks,
> 
> Jon Mease
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20131127/3d640271/attachment.html>


More information about the Okular-devel mailing list