Skip to content

Commit fb7ff18

Browse files
committed
Update context.py
Fix for nodebox#10
1 parent e2de268 commit fb7ff18

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nodebox/graphics/context.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from hashlib import md5
2626
from types import FunctionType
2727
from datetime import datetime
28+
from itertools import chain
2829

2930
import geometry
3031

@@ -630,7 +631,7 @@ def ellipse(x, y, width, height, segments=ELLIPSE_SEGMENTS, **kwargs):
630631
# Then reuse the cached ellipse by scaling it to the desired size.
631632
commands = []
632633
f = 2 * pi / segments
633-
v = [(cos(t)/2, sin(t)/2) for t in [i*f for i in range(segments)+[0]]]
634+
v = [(cos(t)/2, sin(t)/2) for t in [i*f for i in chain(range(segments), [0])]]
634635
for mode in (GL_TRIANGLE_FAN, GL_LINE_LOOP):
635636
commands.append(precompile(lambda:(
636637
glBegin(mode),

0 commit comments

Comments
 (0)