[Poppler-bugs] [Bug 51487] [PATCH] Add support for TextMarkup Annotations in glib frontend

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Jan 19 06:04:24 PST 2014


https://bugs.freedesktop.org/show_bug.cgi?id=51487

--- Comment #41 from Carlos Garcia Campos <carlosgc at gnome.org> ---
(In reply to comment #33)
> (In reply to comment #26)
> > Comment on attachment 88273 [details] [review] [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.

I think the dummy thing was actually a hack introduced in
4b13085568df09d8b75099f6a5438f025a028fd5 that we should not expose in our API.
I think we should require as parameters of the constructors all values that are
required by the PDF spec, even if we internally do a new + set. This means we
should change the PopplerAnnotLine annotation.

-- 
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/20140119/535a77f1/attachment.html>


More information about the Poppler-bugs mailing list