Skip to content

Commit 61e79f6

Browse files
committed
12-15% faster
1 parent ad7148c commit 61e79f6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

nodebox/graphics/context.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,9 @@ def line(x0, y0, x1, y1, **kwargs):
572572
if stroke is not None and strokewidth > 0:
573573
glColor4f(stroke[0], stroke[1], stroke[2], stroke[3] * _alpha)
574574
glLineWidth(strokewidth)
575-
glLineDash(strokestyle)
576-
glBegin(GL_LINE_LOOP)
575+
if strokestyle != _strokestyle:
576+
glLineDash(strokestyle)
577+
glBegin(GL_LINES)
577578
glVertex2f(x0, y0)
578579
glVertex2f(x1, y1)
579580
glEnd()

0 commit comments

Comments
 (0)