[Poppler-bugs] [Bug 70901] Add getter and setter for annotation's rectangle

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Nov 6 17:34:55 PST 2013


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

--- Comment #6 from Germán Poo-Caamaño <gpoo at gnome.org> ---
(In reply to comment #5)
> (In reply to comment #3)
> > Created attachment 88728 [details] [review] [review]
> > glib: Add getter and setter for annotation's rectangle
> > 
> > Updated patch.
> > 
> > Instead of using a reference in poppler_annot_get_rectangle, I think it is
> > better to just return a PopplerRectangle. I am unsure of the default values
> > for g_return_val_if_fail.  Either 0,0,0,0 or -1,-1,-1,-1.
> 
> Same idea here. Instead of returning the struct, you can return a pointer as
> an out parameter. To avoid the problem of how to represent an invalid
> rectangle, make the function return a boolean. When the function returns
> FALSE the value of the rectangle is undefined, whatever the user passed.
> 
> PopplerRectangle rect;
> if (!poppler_annot_get_rect (annot, &rect))
>     /* Do whatever with the rect */

This is what the first patch did.

-- 
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/20131107/5d668bba/attachment.html>


More information about the Poppler-bugs mailing list