[Poppler-bugs] [Bug 70981] glib-demo: Add support for simple line annotations

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Nov 16 01:50:48 PST 2013


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

--- Comment #6 from Germán Poo-Caamaño <gpoo at gnome.org> ---
(In reply to comment #2)
> @@ +1439,5 @@
> >  }
> > +
> > +/* PopplerAnnotLine */
> > +void
> > +poppler_annot_line_set_width (PopplerAnnotLine *poppler_annot, gdouble width)
> 
> This should be documented. Use a new line for every parameter-
> 
> @@ +1447,5 @@
> > +  g_return_if_fail (POPPLER_IS_ANNOT_LINE (poppler_annot));
> > +
> > +  annot = static_cast<AnnotLine *>(POPPLER_ANNOT (poppler_annot)->annot);
> > +  annot->setLeaderLineLength(width);
> > +  annot->setLeaderLineExtension(width);
> 
> This is confusing, because this only applies to annot lines using leader
> lines. Note that simply calling this, changes the meaning of the vertices.
> In a normal lines the width is determined but its vertices, since it's a
> rectangle in the end. I'm not sure how to expose the leader lines thing,
> though.

None of them seems to work.  I had forgotten to split the patch because I was
testing some things with this.

> @@ +1454,5 @@
> > +
> > +void
> > +poppler_annot_line_set_vertices (PopplerAnnotLine *poppler_annot,
> > +                                 gdouble x1, gdouble y1,
> > +                                 gdouble x2, gdouble y2)
> 
> I wonder if we should to expose PopplerPoint, I guess it will be required if
> we eventually expose Polygon annotations.

It is kind of redundant to initialize both, PopplerRect and PopplerPoint with
similar values. However, PopplerPoint seems to make the API simpler to
understand.

I removed everything else that is only noise for very simple lines, and they
were not working.  In Poppler there are some "TODO" marked in the
implementation
of lines, so better to leave it for later.

-- 
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/20131116/00e52f82/attachment.html>


More information about the Poppler-bugs mailing list