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 745736 - goc-line: start-arrow overlayed by line
goc-line: start-arrow overlayed by line
Status: RESOLVED FIXED
Product: libgoffice
Classification: Other
Component: Canvas
GIT
Other All
: Normal major
: ---
Assigned To: Jean Bréfort
Jean Bréfort
Depends on:
Blocks:
 
 
Reported: 2015-03-06 12:22 UTC by j_deutsch
Modified: 2015-03-06 16:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
start-arrow (419.26 KB, image/png)
2015-03-06 12:22 UTC, j_deutsch
Details
rendering of start-arrow after applying patch (156.47 KB, image/png)
2015-03-06 12:28 UTC, j_deutsch
Details

Description j_deutsch 2015-03-06 12:22:34 UTC
Created attachment 298702 [details]
start-arrow

Hi all,

i wonder whether it's intended that the 'start-arrow' is overlayed by the line. At least for my application it doesn't make sense (see the attached picture). 

Since aligning the code to my needs was stupidly simple i don't know whether it's a bug or it's an intended behavior!?

Here is the code diff that yields the new behavior:

diff --git primary:goffice/canvas/goc-line.c master:goffice/canvas/goc-line.c
index 30946cd..88f2a9a 100644
--- primary:goffice/canvas/goc-line.c
+++ master:goffice/canvas/goc-line.c
@@ -260,7 +260,7 @@ goc_line_draw (GocItem const *item, cairo_t *cr)
         if ((endx != 0. || endy!= 0.) &&
            go_styled_object_set_cairo_line (GO_STYLED_OBJECT (item), cr)) {
                /* try to avoid horizontal and vertical lines between two pixels */
-               cairo_move_to (cr, 0., 0.);
+               cairo_move_to (cr, startx, starty);
                cairo_line_to (cr, endx, endy);
                cairo_stroke (cr);
        }
Comment 1 j_deutsch 2015-03-06 12:28:16 UTC
Created attachment 298703 [details]
rendering of start-arrow after applying patch
Comment 2 Jean Bréfort 2015-03-06 13:50:34 UTC
Sure, it's nicer.
What's your name so that we can credit you for the fix and ChangeLog and NEWS?
Comment 3 j_deutsch 2015-03-06 15:33:39 UTC
My name is Johannes Deutsch.

best regards
Comment 4 Jean Bréfort 2015-03-06 16:00:14 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Once that release is available, you may want to check for a software upgrade provided by your Linux distribution.

Patch applied. Thanks.