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 665955 - Trimmed arrow points drawn for GtkArrow
Trimmed arrow points drawn for GtkArrow
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
2.24.x
Other Windows
: Normal enhancement
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-12-11 18:22 UTC by LRN
Modified: 2012-01-25 19:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Draw arrows as polygons, not as rows of pixels. (1.72 KB, patch)
2011-12-11 18:22 UTC, LRN
committed Details | Review

Description LRN 2011-12-11 18:22:43 UTC
Created attachment 203215 [details] [review]
Draw arrows as polygons, not as rows of pixels.

msw style draw_varrow() draw_harrow() draw arrows by putting several parallel lines (rows of pixels) that form a triangle. Problem is, the last line has zero length (start and end coordinates are equal), and cairo seems to be unwilling to stroke such a line as one pixel (which was the intent of whoever wrote draw_varrow() and draw_harrow()). Because of that arrows look like their last pointing pixel was trimmed. This is not an issue for large arrows, but small ones (5x7 and 7x5), which are used by comboboxes, treeview headers, etc, do not look good.

I've attached a patch that uses different algorithm:
Instead of making a triangle from several rows of pixels, it uses cairo naturally by drawing a polygon consisting of 3 points, and then strokes and fills it.
Comment 1 Dieter Verfaillie 2012-01-25 19:29:36 UTC
Thanks for the patch, committed as fc3cff11b5145241912377bde1a66d4d6a14d006

This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.