ActionScript Aligning Graphics Line Style Stroke?

Posted by TheDarkIn1978 on Stack Overflow See other posts from Stack Overflow or by TheDarkIn1978
Published on 2010-06-13T00:09:22Z Indexed on 2010/06/13 0:12 UTC
Read the original article Hit count: 201

is it possible to align the stroke of a graphic with actionscript? for example, the following code creates a black rounded rect with a grey stroke that is automatically centre aligned.

var t:Sprite = new Sprite();
t.graphics.lineStyle(5, 0x555555);
t.graphics.beginFill(0, 1);
t.graphics.drawRoundRect(25, 25, 200, 75, 25, 25);
t.graphics.endFill();

the lineStyle function doesn't seem to offer any built-in functionality for aligning the stroke. in Adobe Illustrator, you can align a stroke to be either centre (default), inside or outside.

© Stack Overflow or respective owner

Related posts about actionscript-3

Related posts about graphics