[Poppler-bugs] [Bug 83642] add a displayAnnot to Page class
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Feb 22 23:07:08 UTC 2018
https://bugs.freedesktop.org/show_bug.cgi?id=83642
Tobias Deiminger <haxtibal at posteo.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |haxtibal at posteo.de
--- Comment #4 from Tobias Deiminger <haxtibal at posteo.de> ---
Created attachment 137545
--> https://bugs.freedesktop.org/attachment.cgi?id=137545&action=edit
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] https://gist.github.com/haxtibal/eab9320d43e47dfefe47249ee1e6d01a
[1] https://bugs.kde.org/show_bug.cgi?id=358065
[2] https://bugs.kde.org/show_bug.cgi?id=333981
[3] https://bugs.kde.org/show_bug.cgi?id=358061
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler-bugs/attachments/20180222/38eb2e4d/attachment.html>
More information about the Poppler-bugs
mailing list