Closed Bug 290331 Opened 20 years ago Closed 17 years ago

dashes are too small when stroke-linecap="round" is used with stroke-dasharray

Categories

(Core :: SVG, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: holger, Unassigned)

References

()

Details

(Keywords: testcase)

Attachments

(7 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050413 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050413 Firefox/1.0+

in the page at http://www.treebuilder.de/svg/dashc.svg there are 4 rects. the
top left rect is doted - it should be stroked width dashes with round caps.
additionaly the buttom left rect should be dotted, with the dots touching each
other. 
p.s.: the buttom right rect should not have a stroke at all i think...

Reproducible: Always

Steps to Reproduce:
1.use stroke-dasharray="0,20" stroke-width="20" on any shape. 
2.
3.

Actual Results:  
the shape is fully stroked

Expected Results:  
the shape should have a doted stroke, where dot radius = 10 and distance of
center points = 20.
Attached image testfile.svg (obsolete) —
Attached image expected result
expected behaviour. though i think the buttom right rect should not have a
stroke at all.
possibly effecting 
https://bugzilla.mozilla.org/show_bug.cgi?id=288498

especialy the buttom right rect, which should not be stroked instead of fully
stroked.
Keywords: testcase
Summary: dashes are to small when stroke-linecap="round" is used with stroke-dasharray → dashes are too small when stroke-linecap="round" is used with stroke-dasharray
Status: UNCONFIRMED → NEW
Ever confirmed: true
this bug seems fixed by the switch to cairo.
but there are some new problems with the testcase now.
Attached image testcase 1
using a length of 0 produces some screen artefacts.
Attachment #180722 - Attachment is obsolete: true
Attached image testcase 2
using a value slightly larger than 0 works fine.
but now half of the first dot is missing.
Attached image testcase 3
if the length is too small, 0.00001 in the testcase, dots diaspear.
resize the window to see the bug in action.
Attached image testcase 4
if length and space are equal ( stroke-dasharray="20,20" ), another type of
artefact is produced. again resize your window to see the bug in action.
I believe this attachments demonstrates the same problem. Resize your browser window to see the artifacts.

I've tested changing the value of stroke-dasharray from "1" to "40". The buggy values are 6, 10, 18, 22, 26, 27, 30, and 33. Some are worse than others. It would be nice (at least) to be able to calculate if a particular value will be problematic, in order to workaround this bug.
Seems to be corrected by latest cairo fixes. Attached screen shot which shows the (apparently) proper result.

Previous version (buggy):
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b4pre) Gecko/2008021804
Minefield/3.0b4pre

Current version (fixed):
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b4pre) Gecko/2008022104 Minefield/3.0b4pre
Well the bug as originally reported is no longer showing, so let's close this as worksforme. There is some weirdness around the corners of the rects in the testcase though, so I've filed bug 418880 for that.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: