ofLine inaccurate ??

I’m just trying to draw a bunch of lines next to each other to make a solid surface.

Can anybody tell me why there are gaps in the lines with this code?

  
  
  
 for (int i = 0; i < 255; i++){  
        ofSetColor(0,0,i);  
        ofLine(50+i,50,50+i,70);  
}  
  

I’m not sure since it seems like it would work. You can try changing the line width to see if that makes a difference ofSetLineWidth(number).

Thanks for that. Doesn’t make sense but it works.

line width of 1.0 gives broken results.
line width of 1.5 give what you would expect for a line width of 1.0

![](http://forum.openframeworks.cc/uploads/default/1720/bad lines.png)

![](http://forum.openframeworks.cc/uploads/default/1721/good lines.png)