View Full Version : [OPEN] [DUP][CLOSED][4.0.0] Sprite Stroke Opacity in VML

19 Apr 2011, 12:21 AM
Stroke opacity doesn't work in VML. It works perfectly in SVG.

//This works in SVG
'stroke-opacity': 0.5
}, true);

When I look into the source code of VML the opacity should be handled.

19 Apr 2011, 4:07 AM
According to this site stroke opacity is possible in VML.

19 Apr 2011, 6:39 AM
did you checked if it works, if using opacity instead stroke-opacity?

19 Apr 2011, 6:47 AM
Yes I tried opacity and 'stroke opacity'. No result.
In the VML engine I see them checking on 'stroke-opacity' so I guess that's the right one to use.

Jamie Avins
19 Apr 2011, 8:52 AM
Specifying stroke-opacity along with opacity or stroke currently works, but just specifying stroke-opacity didn't. This is now resolved and you can specify a change to just the stroke-opacity and it will update.

The tricky one with VML is specifying a stroke < 1 because that isn't supported. What we do in that case is to use a stroke of 1 and use stroke-opacity to simulate it being smaller. The effect actually works pretty well as seen in the Tiger sample which uses very small stroke sizing for the whiskers.

19 Apr 2011, 10:46 PM
I tried using both opacity and 'stroke-opacity' but still no result:

var lPath = lSurface.surface.rectPath(x, y, w, h);

var box = lSurface.surface.add({
type: 'path',
path: lPath,
fill: 'none',
zIndex: 400,
stroke: '#000',
'stroke-width': 10,
opacity: 0,
'stroke-opacity': 0


box.on('mouseover', function () {
The reason I do it this way is because I want to use a mouseover on the borders of the box only. But they may not be visible. But I still see the borders. Anyway if this is fixed in the next release then I'm not bothering now.

Edit: as you see I'm not using a stroke-width of < 1.

30 Apr 2011, 6:59 AM
I still can't set the stroke opacity in VML using 'stroke-opacity': 0
Am I doing something whrong here?

5 May 2011, 11:16 PM
I'm still not able to do this. Can you give me an example of this working in VML (where the stroke opacity is 0 and you can't see the stroke)? I've tried about everything now