I’m using haxe since a long time and decide to switch to openfl, i try to update my game and i just discover a bug with html5 (all works fine with flash).
I draw some lines on a sprite graphics but when i switch the lineStyle, it automatically add a “lineTo” to the origin.
Here’s the code:
private function fail()
var fail:Sprite = new Sprite();
fail.graphics.lineStyle(1, 0x00ff00); fail.graphics.moveTo(100, 100); fail.graphics.lineTo(200, 100); fail.graphics.lineTo(200, 200); fail.graphics.lineStyle(2, 0xff0000); }
And the result it’s the green line on the printscreen. i must have two lines, but here there’s 3, my 2 lines plus a line to the origin.
Anybody else have seen this ? Is there a workaround ?