• Post Reply Bookmark Topic Watch Topic
  • New Topic

drawPolyLine() Leaving Streaks at Endpoints

 
Ike Gentz
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am currently using drawPolyLine(int[], int[], int[].length) to draw a line representing the ground coordinates for a platforming game. However, the endpoints are leaving streaks when I scroll across the screen. I fixed the one that was at the end by simply using vals.length - 1 (for the length of the array) instead of vals.length

I know for a fact that both the arrays I am passing in for coordinates, xVals and yVals, are the same length. I am wondering why the first point leaves a line behind as it scrolls.

Here is a picture showing what is happening Problem Picture

You can see that the very first point left a streak (Sonic was falling downwards, which is why the streak goes down).
 
Ike Gentz
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ignore this post. I found out what was wrong. Silly error
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!