Hello,
Something i still can't solve is that when drawing for example a rect in
a Shape graphics object with a fat lineStyle, the line drawn is always
half it's thicknes in the inner part of the rect and half outside; This
always gives me headaches when aligning, measuring, skinning or
bitmapping stuff since half the line is in the negative x / y coordinate
space of the shape..
I know that I can use the getBounds method to get me the accurate
negative x and y offset of the (line) graphics, but what I really want
is to have the line beign drawn totally within the rect. Is that
possible by the default graphics api ? Then please expand on my example.
Thanks.
Latcho.
var spr:Sprite = new Sprite();
addChild(spr);
var g:Graphics = spr.graphics;
g.lineStyle(10,0xff0000);
g.beginFill(0x0000ff);
g.drawRect(0,0,100,100);
g.endFill();
trace(spr.width,spr.height); // -> 110 110
trace(spr.getBounds(this)) // -> (x=-5, y=-5, w=110, h=110)
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders