After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 769133 - Better hover for highlight annotations
Better hover for highlight annotations
Status: RESOLVED OBSOLETE
Product: evince
Classification: Core
Component: PDF
unspecified
Other All
: High normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-07-24 19:27 UTC by José Aliste
Modified: 2018-05-22 16:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
document: ev_mapping_list_get_all (2.50 KB, patch)
2016-07-24 19:27 UTC, José Aliste
reviewed Details | Review
libdocument, pdf: adding method is_xy_in_annotation (5.96 KB, patch)
2016-07-24 19:28 UTC, José Aliste
none Details | Review
libview: checking if point is inside annotation (1.89 KB, patch)
2016-07-24 19:28 UTC, José Aliste
none Details | Review

Description José Aliste 2016-07-24 19:27:47 UTC
Using just the rectangle to hover a highlight annotation is not good. For instance, it is easy to have two highlight annotations with rectangles that overlap. Currently we cannot detect this... These patches fix that. These are rebased from Giselle's work.
Comment 1 José Aliste 2016-07-24 19:27:59 UTC
Created attachment 332048 [details] [review]
document: ev_mapping_list_get_all

Implements a function that returns all EvMappings
at a certain point. Needed for annotations
(especially text markups), whose bounding boxes
might overlap.
Comment 2 José Aliste 2016-07-24 19:28:17 UTC
Created attachment 332049 [details] [review]
libdocument, pdf: adding method is_xy_in_annotation

Added the method is_xy_in_annotation to the
interface of document-annotations. It intends to
check if a point (x,y) is inside the annotation's
quadrilaterals (and not its bounding box, which
can be checked using the EvMapping).
Also implements the function in the pdf back-end.
Comment 3 José Aliste 2016-07-24 19:28:38 UTC
Created attachment 332050 [details] [review]
libview: checking if point is inside annotation

Added a step to check if a point is inside an
annotation. In case it is foud to be inside the
bounding box, view asks the document if it is
actually inside the annotations, since the
quadrilaterals might not comprise the whole are of
the bounding box. Only then it become selectable.
Comment 4 Germán Poo-Caamaño 2016-08-01 04:33:40 UTC
Review of attachment 332048 [details] [review]:

::: libdocument/ev-mapping-list.c
@@ +141,3 @@
+ * Returns: (transfer none): a #GArray of all the #EvMapping in the list at coordinates (x, y)
+ *
+ * Since: 3.14

I think we need to update this one.
Comment 5 Germán Poo-Caamaño 2016-08-01 04:36:37 UTC
Nice work.

It is very convenient. Without this patches it was kind of hard (annoying to be honest :-) to select the text next to the annotation because it was within the rectangle.
Comment 6 Germán Poo-Caamaño 2016-09-28 19:40:39 UTC
Carlos, what do you think?
Comment 7 Fabian Franzen 2017-10-04 21:18:43 UTC
The patch seems to be incomplete as it doesn't seem to fix Bug 787070 while the problems sound similar.
Comment 8 José Aliste 2017-10-04 21:46:38 UTC
The problems are unrelated :) Nevertheless, I will update the patches so Carlos can review up to date patches.
Comment 9 Fabian Franzen 2017-10-04 23:48:48 UTC
Yeah, I just figured out what your patch does exactly. As your and my patch are both fielding with the selection process anyway: What do you think about moving the get_annotation_mapping_at_location stuff in the poppler backend instead of adding is_xy_in_annotation to the EvDocumentAnnotationsInterface? Isn't the selection process of an annotation strongly coupled to the file-format? (just a thought, feel free to ignore it ;) )
Comment 10 GNOME Infrastructure Team 2018-05-22 16:43:58 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/evince/issues/696.