diff --git a/examples/canvas/lines.py b/examples/canvas/lines.py index 798e9060e..b3e262561 100644 --- a/examples/canvas/lines.py +++ b/examples/canvas/lines.py @@ -139,7 +139,9 @@ class LinePlayground(FloatLayout): alpha_controlline = NumericProperty(1.0) alpha = NumericProperty(0.5) close = BooleanProperty(False) - points = ListProperty([(500, 500), 300, 300, 500, 300, [500, 400, 600, 400]]) + points = ListProperty([(500, 500), + 300, 300, 500, 300, + [500, 400, 600, 400]]) points2 = ListProperty([]) joint = OptionProperty('none', options=('round', 'miter', 'bevel', 'none')) cap = OptionProperty('none', options=('round', 'square', 'none')) diff --git a/kivy/graphics/vertex_instructions_line.pxi b/kivy/graphics/vertex_instructions_line.pxi index 18516dda9..d3e295527 100644 --- a/kivy/graphics/vertex_instructions_line.pxi +++ b/kivy/graphics/vertex_instructions_line.pxi @@ -660,8 +660,6 @@ cdef class Line(VertexInstruction): free(vertices) free(indices) - - property points: '''Property for getting/settings points of the line @@ -672,16 +670,16 @@ cdef class Line(VertexInstruction): ''' def __get__(self): return self._points + def __set__(self, points): - tmp=[] + tmp = [] for p in points: - if isinstance(p,(list,tuple)): - tmp=tmp+list(p) + if isinstance(p, (list, tuple)): + tmp = tmp + list(p) else: tmp.append(p) - self._points=tmp + self._points = tmp self.flag_update() - property dash_length: '''Property for getting/setting the length of the dashes in the curve