pupsnow / svgweb

Automatically exported from code.google.com/p/svgweb
Other
0 stars 0 forks source link

Implement stroke-dasharray and stroke-dashoffset #65

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In our unit tests we draw a rectangle using stroke-dasharray and
stroke-dashoffset:

rect = document.createElementNS(svgns, 'rect');
        svg = document.getElementById('mySVG');
        rect.setAttribute('x', 400);
        rect.setAttribute('y', 20);
        rect.setAttribute('width', 60);
        rect.setAttribute('height', 60);
        rect.setAttribute('rx', 3);
        rect.setAttribute('ry', 5);
        rect.style.opacity = 0.5;
        rect.style.fill = '#0000FF';
        svg.appendChild(rect);
        rect.style.stroke = 'rgb(0, 255, 0)';
        rect.style.strokeWidth = '10px';
        rect.style.strokeOpacity = 0.8;
        rect.style.strokeLinecap = 'round';
        rect.style.strokeLinejoin = 'round';
        rect.style.strokeMiterlimit = 15;
        rect.style.strokeDasharray = '5,3,2';
        rect.style.strokeDashoffset = 3;

The final two properties, strokeDasharray and strokeDashoffset, are
currently not used. I have attached the incorrect rendering from the Flash
viewer along with the correct rendering by Firefox.

Original issue reported on code.google.com by bradneub...@gmail.com on 31 Mar 2009 at 6:38

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by bradneub...@gmail.com on 22 May 2009 at 12:39

GoogleCodeExporter commented 9 years ago

Original comment by bradneub...@gmail.com on 20 Oct 2009 at 12:09

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Our team is using svgweb to build a fabulous project and this feature is very 
important for us.

Please help.

Thanks.

Original comment by Leaskh on 25 Oct 2010 at 10:14

GoogleCodeExporter commented 9 years ago
Example codes as below:

<line id="idHere" x1="0" y1="0" x2="100"  y2="100" stroke-width="1" 
stroke-dasharray="7, 3"/>

How can we make the attribute "stroke-dasharray" work in the frustrating 
Internet Explorer.

Original comment by Leaskh on 25 Oct 2010 at 10:24

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
yes, this, pls

Original comment by kimka...@googlemail.com on 7 Nov 2012 at 10:52