windows 10/pyglet 1.5.26.
I'm unable to convince pyglet to draw a (visible) line with both vertices having a y-coordinate = 0. This does not seem to be a problem with other primitives:
from pyglet import shapes
class DrawingWindow(pyglet.window.Window):
def __init__(self):
super(DrawingWindow, self).__init__(300, 300)
self.batch = pyglet.graphics.Batch()
def on_draw(self):
# this red line is not visible:
l0 = shapes.Line(0, 0, 300, 0, color=(255, 0, 0), batch=self.batch)
# this blue one is (note y-coordinate), though it appears to have y-coordinates = 0:
l1 = shapes.Line(0, 1, 200, 0, color=(0, 0, 255), batch=self.batch)
# and this green-bordered rectangle is OK too:
square = shapes.BorderedRectangle(0, 0, 100, 100,
border=1, color=(255, 255, 255),
border_color=(0, 255, 0), batch=self.batch)
self.clear()
self.batch.draw()
if __name__ == '__main__':
window = DrawingWindow()
pyglet.app.run()```
I've tried this with a simple pyglet.draw(...) call with the same result.