<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/114153/">http://git.reviewboard.kde.org/r/114153/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On November 27th, 2013, 7:49 p.m. UTC, <b>Fabio D'Urso</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Rendering differences (that I judged ugly) were the reason why I chose to go the dashed outline route.</pre>
 </blockquote>




 <p>On November 27th, 2013, 7:55 p.m. UTC, <b>Jon Mease</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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.</pre>
 </blockquote>





 <p>On November 27th, 2013, 8:12 p.m. UTC, <b>Fabio D'Urso</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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
</pre>
 </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Thanks for the feedback. I'll give this a shot and update the patch accordingly.  I'll also see if I can generate some annotations with leader lines in Foxit and take a look at Okular's rendering.

BTW, the larger project I'm working towards right now is to be able to write on PDFs in Okular with a Wacom tablet and be able to bulk-select words (collections of ink strokes) and move them around like in Xournal.  This update will really improve the appearance of this bulk translation of annotations.

I like the sound of this Poppler patch, but it certainly does sound like a lot of work.</pre>
<br />










<p>- Jon</p>


<br />
<p>On November 27th, 2013, 3:22 p.m. UTC, Jon Mease wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Okular.</div>
<div>By Jon Mease.</div>


<p style="color: grey;"><i>Updated Nov. 27, 2013, 3:22 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
okular
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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?</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>ui/pagepainter.cpp <span style="color: grey">(d5d9c3e)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/114153/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>