I see these when drawing focus rectangles in gtk with line width > 1. Not sure if the line width is a hard requirement for the bug. I'll attach a small gtk example showing the problem
Created attachment 3615 [details] test case
Created attachment 3628 [details] Test case suitable for cairo/test suite I've successfully replicated the bug (thanks for the nice test case). Here's a slightly simpler version of the test case ready to drop into the test suite in cairo/test.
Created attachment 3630 [details] Test case suitable for cairo/test suite I've successfully replicated the bug (thanks for the nice test case). Here's a slightly simpler version of the test case ready to drop into the test suite in cairo/test.
Comment on attachment 3630 [details] Test case suitable for cairo/test suite Sorry about that. Came back after lunch and thought I hadn't clicked submit yet. :-}
Created attachment 3738 [details] Image of the current buggy behavior
I see this is in ROADMAP for 1.0.4, no patch though.
(In reply to comment #6) > I see this is in ROADMAP for 1.0.4, no patch though. Wee need to get 1.0.4 out for the gcc 4.0 compilation fixes and the zero-sized glyph fix. Why don't we just slip this known bug out to the 1.0.6 ROADMAP. -Carl
We didn't mean to close this. The bug certainly isn't fixed yet, (we were just trying to slip it out past 1.0.4).
This is the problem as it applies to the test case. The first segment starts with dash_on set to 0, so first_face should not be set at all for the path. However, the segment starting at the lower right corner starts at the same point that dash_on is going from 0 to 1, and so gets set as first_face. At the end of the closing line, current_face is set. With both first_face set (at the lower right) and current_face set (at the upper left), a join is attempted. This results in the big wedge.
Created attachment 8604 [details] [review] Fixes the bug causing the leaky dash problem In the cairo test suite: fixes leaky-dash, no other changes.
Fix is pushed now and will be in 1.4. commit afd5f92195335a88d7c1ff181a1bd03ca01b424f Author: Jeff Muizelaar <jrmuizel@uwaterloo.ca> Date: Mon Feb 19 16:06:57 2007 -0500 Fix several issues with dashed stroking code, particularly 'leaky-dash' Adds some state, 'dash_starts_on', to keep track of whether a dashed path starts with dash_on or not. This fixes the 'leaky-dash' bug (#4863) and some other degenerate cases. The new version is, in my opinion, considerably cleaner and more understandable than the old code. Finally, the rewrite changes the behaviour of dashing to add degenerate caps around corners that start at the same place as a dash begins. This matches the behaviour seen in acroread. This rewrite is based on an initial rewrite done by Jeff Smith.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.