Hi,
I am converting an AS3 project and I noticed a different behavior in HTML5 when tracing a line.
In Flash I had this sequence of code lines
currentLine = new Shape();
currentLine.graphics.lineStyle(1, 0xffffff, 1);
currentLine.graphics.beginFill(0x000000, 0);
currentLine.graphics.lineTo (70, 0);
currentLine.graphics.endFill();
And the result was this
In HTML5 the result is this
(the dot in the bottom right)
If I put the “lineStyle” line after beginFill it magically draws the line correctly:
currentLine = new Shape();
currentLine.graphics.beginFill(0x000000, 0);
currentLine.graphics.lineStyle(1, 0xffffff, 1);
currentLine.graphics.lineTo (70, 0);
currentLine.graphics.endFill();
A line should always start from 0,0, unless I use moveTo, but in this case it doesn’t happen.