<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:haxtibal@posteo.de" title="Tobias Deiminger <haxtibal@posteo.de>"> <span class="fn">Tobias Deiminger</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - add a displayAnnot to Page class"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=83642">bug 83642</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>haxtibal@posteo.de
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - add a displayAnnot to Page class"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=83642#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - add a displayAnnot to Page class"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=83642">bug 83642</a>
              from <span class="vcard"><a class="email" href="mailto:haxtibal@posteo.de" title="Tobias Deiminger <haxtibal@posteo.de>"> <span class="fn">Tobias Deiminger</span></a>
</span></b>
        <pre>Created <span class=""><a href="attachment.cgi?id=137545" name="attach_137545" title="QImage rendered with similar QT5 patch">attachment 137545</a> <a href="attachment.cgi?id=137545&action=edit" title="QImage rendered with similar QT5 patch">[details]</a></span>
QImage rendered with similar QT5 patch

Hi guys,

is this issue still worth discussing or is it already doomed as impossible /
too complicated / too little benefit?

I'm currently doing a patch with similar goals for the QT5 frontend (just for
fun and learning). Patrick Golden pointed me to here - thanks Patrick! If you
like, we could join efforts.

For now you can watch patch progress here [0]. The attached PNG demonstrates
the current state: An opaque free text annotation was rendered with the patch
to an QImage, the QImage was saved to file and then opened in GIMP.

My patch differs a bit from yours:
-QT5 frontend
-render API method is added to Annotation instead of Page class
-I refactored Annot::draw with template design pattern in mind, to be able to
hook in between the newly established makeAnnotation and drawAnnotaiton steps.
This way I'm able to respect the size of the dynamically created appearance
object (may be != Annot::rect).

Imho valid use cases do still exist:
UC1 Extract isolated annotations from PDF in non-pdf-reader environments, maybe
some command line tool.
UC2 When new annotation shall be added in a reader (e.g. popup note), show a
realistic preview of the icon, instead of some inaccurate dummy icon. [1]
UC3 Paint annotations while dragging them around (rendering page wise is too
expensive). [2]
UC4 Enable composition of annotations in readers.
UC5 WYSIWYG editing inline notes in readers. [3]

For UC1..2, one probably wants to get just an isolated annotation drawn on
transparent background, without other objects mixed in. Seems not too
difficult.
For UC3..5, blending/compositing and probably z-order comes into play, which is
somewhere between a bit more tricky and impossible, I don't know :)

Would you agree with those UCs?

Cheers
Tobias

[0] <a href="https://gist.github.com/haxtibal/eab9320d43e47dfefe47249ee1e6d01a">https://gist.github.com/haxtibal/eab9320d43e47dfefe47249ee1e6d01a</a>
[1] <a href="https://bugs.kde.org/show_bug.cgi?id=358065">https://bugs.kde.org/show_bug.cgi?id=358065</a>
[2] <a href="https://bugs.kde.org/show_bug.cgi?id=333981">https://bugs.kde.org/show_bug.cgi?id=333981</a>
[3] <a href="https://bugs.kde.org/show_bug.cgi?id=358061">https://bugs.kde.org/show_bug.cgi?id=358061</a></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>