<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#c41">Comment # 41</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:carlosgc@gnome.org" title="Carlos Garcia Campos <carlosgc@gnome.org>"> <span class="fn">Carlos Garcia Campos</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=51487#c33">comment #33</a>)
<span class="quote">> (In reply to <a href="show_bug.cgi?id=51487#c26">comment #26</a>)
> > 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] [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.

> <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.</span >

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.</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>