[Poppler-bugs] [Bug 51487] [PATCH] Add support for TextMarkup Annotations in glib frontend
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sun Nov 3 04:40:35 PST 2013
https://bugs.freedesktop.org/show_bug.cgi?id=51487
--- Comment #27 from Carlos Garcia Campos <carlosgc at gnome.org> ---
(In reply to comment #24)
> Created attachment 88275 [details]
> Screenghost that shows the difference between cairo and a list of rectangles
>
> The demo add two implementations to set the Quadrilaterals. Using
> cairo_region_t or getting a GList of rectangles.
>
> For the GList of rectangles I use a deprecated function of poppler-glib:
> poppler_page_get_selection_region() that deprecated in favor of
> poppler_page_get_selected_region().
Maye text layout would be more appropriate than selected_region. We could add
poppler_page_get_text_layout_for_rectangle as we discussed in the mailing list,
so that you can pass the bbox of the annotations, and then you can build the
list of lines. Or even a more convenient method that returns the list of lines
instad of characters.
> In the screenshot it is possible to see the difference of both
> implementations:
> * With the GList we get one rectangle per line and it is rendered
> with small rectangles with small rounding ends.
> * With cairo_region_t we get only 2 rectangles, making one huge rounding ends
> and one smaller.
Yes, it's clear we really want the list of rectangles.
> The issue with cairo_region_t is exacerbated when using underline, squiggly
> or strikeout. Because those are rendered per rectangle. So, instead of
> having every line underline or strikeout, there one big underline for the
> big rectangle.
>
> Anyhow, you can try the patch setting cairo = TRUE|FALSE inside
> pgd_annots_update_selected_text().
--
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/20131103/7de9e643/attachment.html>
More information about the Poppler-bugs
mailing list