[Poppler-bugs] [Bug 51487] [PATCH] Add support for TextMarkup Annotations in glib frontend
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Nov 20 10:42:42 PST 2013
https://bugs.freedesktop.org/show_bug.cgi?id=51487
--- Comment #33 from Germán Poo-Caamaño <gpoo at gnome.org> ---
(In reply to comment #26)
> Comment on attachment 88273 [details] [review]
> glib: Add PopplerAnnotTextMarkup class and subtypes
> [...]
> @@ +329,5 @@
> > + * Since: 0.25
> > + */
> > +PopplerAnnot *
> > +poppler_annot_text_markup_new_highlight (PopplerDocument *doc,
> > + PopplerRectangle *rect)
>
> quad points is required field in text markup annot dict, so I think the
> constructors should receive the quadrilaterals.
While I was implementing this, I noticed that the constructor in Annot.c
adds a dummy quadrilateral.
http://cgit.freedesktop.org/poppler/poppler/tree/poppler/Annot.cc#n3560
I think a good compromise would be to make it clear in the API
documentation that poppler_annot_text_markup_new_highlight adds a dummy
Quadrilateral, and to call poppler_annot_text_markup_set_quadrilaterals()
for changing them. That is, no requirement for quadrilateral in the
constructor (it already provides a dummy one).
My rationale is: if the constructor require quadrilaterals, in an
interactive use (like the proposed in the demo), we would create
a dummy quadrilateral taken from the rectangle. For a single click,
it would be (0,0)(0,0), which is the same than the dummy quadrilateral
already created in AnnotTextMarkup::AnnotTextMarkup.
I could do it either way, but I wanted to bring the alternatives we have
available before to proceed.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20131120/ff1f01a7/attachment-0001.html>
More information about the Poppler-bugs
mailing list