Jump to content

Drawing lines, unwanted gradient effect


Recommended Posts

I am drawing a series of lines using graphics moveTo and lineTo and for some reason the last line always has a gradient effect.

Here is the code:

var cellWidth = containerWidth / 16;
var vLines = app.game.add.graphics(0, 0);
vLines.lineStyle(1, 0xffffff);

for(var i=0;i<16;i++){
  vLines.moveTo(cellWidth*i, 0);
  vLines.lineTo(cellWidth*i, containerHeight);


Here's an image with how this looks. Any idea what's causing this gradient effect on the last line?


Link to comment
Share on other sites


  • Recently Browsing   0 members

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