My project uses a third party libraries (as3svgrendererlib) for drawing SVG. It draws shapes as expected, correctly. After that my application should apply its own effects (like fill, stroke, filters) which I implemented with the help of mask. Fills and filters work for me, but stroke – doesn’t.
override protected function updateDisplayList(unscaledWidth: Number, unscaledHeight: Number): void
{
super.updateDisplayList(unscaledWidth, unscaledHeight);
mask = getComponentMask();
if (_fillOptions)
{
var g: Graphics = graphics;
var f: IFill = _fillOptions.fill;
var tb: Rectangle = new Rectangle(0, 0, unscaledWidth, unscaledHeight);
var to: Point = new Point(0, 0);
var s: IStroke = _strokeOptions.stroke;
s.apply(g, tb, to);
f.begin(g, tb, to);
g.drawRect(0, 0, unscaledWidth, unscaledHeight);
f.end(g);
}
}
So what is the possible ways to draw stroke around existing UIComponent?
Thank you.
-Viktor Burdeinyi
To simulate a stroke you may use a
GlowFilterwith its strength and alpha to the max.