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

2014-08-06 Thread Albert Astals Cid

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


Jon, is it OK if i discard this? I understand you have a copy of the code 
somewhere locally (or you can push it to a branch if you want) and this way I 
have a cleaner dashboard in reviewboard.

Cheers,
  Albert

- Albert Astals Cid


On des. 30, 2013, 12:53 p.m., Jon Mease wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/114153/
 ---
 
 (Updated des. 30, 2013, 12:53 p.m.)
 
 
 Review request for Okular.
 
 
 Repository: okular
 
 
 Description
 ---
 
 Update: The plan now is to only perform the internal rendering described 
 below for Line, Ink, and Geometric annotations.  As I've worked with the 
 internal rendering for these annotation types I've found several small bugs 
 in the internal annotation rendering code that cause visual differences 
 between Okular's rendering and Poppler's. My next steps are to open a series 
 of bug reports and small review requests for these individual rendering bugs. 
  This review request can be considered to be on-hold until I've had time to 
 document and fix these rendering bugs.
 
 
 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: https://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
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


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

2013-12-30 Thread Jon Mease

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

(Updated Dec. 30, 2013, 12:53 p.m.)


Review request for Okular.


Changes
---

Added a status update to the description.


Repository: okular


Description (updated)
---

Update: The plan now is to only perform the internal rendering described below 
for Line, Ink, and Geometric annotations.  As I've worked with the internal 
rendering for these annotation types I've found several small bugs in the 
internal annotation rendering code that cause visual differences between 
Okular's rendering and Poppler's. My next steps are to open a series of bug 
reports and small review requests for these individual rendering bugs.  This 
review request can be considered to be on-hold until I've had time to document 
and fix these rendering bugs.


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: https://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

___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


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

2013-12-01 Thread Jon Mease


 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.
 
 Fabio D'Urso wrote:
 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

 
 Jon Mease wrote:
 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.
 
 Fabio D'Urso wrote:
 You don't need FoxIt at all :) Just create a straight line in Okular and 
 set its Leader Line and Leader Line Extension Length properties, then compare 
 Poppler's and PagePainter's renderings.
 If they look the same, then I was not remembering correctly :P

Thanks for feedback and for the tip. Yes, you're right that Okular's internal 
rendering of line annotations with leader lines doesn't match Poppler's. In 
addition, the leader lines aren't always drawn at a perfectly right angle to 
the main line using Okular's rendering. I've started updating Okular's drawing 
logic to match poppler, but I'm going to need to update the hit test for line 
annotations as well. I'll update this review request when I finish this part. 


- Jon


---
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
 


___
Okular-devel mailing list
Okular-devel@kde.org

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

2013-11-27 Thread Jon Mease

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

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

___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


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

2013-11-27 Thread Albert Astals Cid

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


Don't have an opinion to be honest. It is true that for some cases it looks 
better, but for some others it looks weird since you switch between text 
rendered by poppler and text rendered by us. I'm not oposed to either. Fabio?

- Albert Astals Cid


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
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


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

2013-11-27 Thread Fabio D'Urso

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


Rendering differences (that I judged ugly) were the reason why I chose to go 
the dashed outline route.

- Fabio D'Urso


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
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


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

2013-11-27 Thread Jon Mease


 On Nov. 27, 2013, 7:44 p.m., Albert Astals Cid wrote:
  Don't have an opinion to be honest. It is true that for some cases it looks 
  better, but for some others it looks weird since you switch between text 
  rendered by poppler and text rendered by us. I'm not oposed to either. 
  Fabio?

A compromise would be to only use this approach for the geometric shapes (Ink 
stroke, line, polygon, and ellipse) and keep that past behavior for everything 
else.  The geometric shapes seem to me to be rendered nearly identically in 
Okular as in Poppler.


- Jon


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


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
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


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

2013-11-27 Thread Jon Mease


 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.

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.


- Jon


---
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
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


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

2013-11-27 Thread Fabio D'Urso


 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
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


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

2013-11-27 Thread Jon Mease


 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.
 
 Fabio D'Urso wrote:
 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


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.


- Jon


---
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
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


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

2013-11-27 Thread Fabio D'Urso


 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.
 
 Fabio D'Urso wrote:
 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

 
 Jon Mease wrote:
 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.

You don't need FoxIt at all :) Just create a straight line in Okular and set 
its Leader Line and Leader Line Extension Length properties, then compare 
Poppler's and PagePainter's renderings.
If they look the same, then I was not remembering correctly :P


- 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
 


___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel