<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - [PATCH] Add support for TextMarkup Annotations in glib frontend"
href="https://bugs.freedesktop.org/show_bug.cgi?id=51487#c33">Comment # 33</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - [PATCH] Add support for TextMarkup Annotations in glib frontend"
href="https://bugs.freedesktop.org/show_bug.cgi?id=51487">bug 51487</a>
from <span class="vcard"><a class="email" href="mailto:gpoo@gnome.org" title="Germán Poo-Caamaño <gpoo@gnome.org>"> <span class="fn">Germán Poo-Caamaño</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=51487#c26">comment #26</a>)
<span class="quote">> Comment on <span class="bz_obsolete"><a href="attachment.cgi?id=88273" name="attach_88273" title="glib: Add PopplerAnnotTextMarkup class and subtypes">attachment 88273</a> <a href="attachment.cgi?id=88273&action=edit" title="glib: Add PopplerAnnotTextMarkup class and subtypes">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=51487&attachment=88273'>[review]</a> [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.</span >
While I was implementing this, I noticed that the constructor in Annot.c
adds a dummy quadrilateral.
<a href="http://cgit.freedesktop.org/poppler/poppler/tree/poppler/Annot.cc#n3560">http://cgit.freedesktop.org/poppler/poppler/tree/poppler/Annot.cc#n3560</a>
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.</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>