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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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