Jump to content

Graphics drawing bug


InsaneHero
 Share

Recommended Posts

Just a FYI:

 

Line drawing fails if you mix it with other graphics commands.  The code snippet below will draw the circles but the lines vanish.  Simple fix is to draw the lines then iterate again to draw the circles, but this combined drawing should work too.

            graphics.lineStyle(1, 0xffffff, 1);            for (var i = 0; i < c.control.length; i++)            {                var x = control[i].x;                var y = control[i].y;                if (i == 0)                {                    graphics.moveTo(x, y);                }                else                {                    graphics.lineTo(x, y);                }                graphics.beginFill(0xafafaf);                graphics.drawEllipse(x, y, 3, 3);                graphics.endFill();            }
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...