Skip to content

Commit

Permalink
python3: slots do not work for class attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphael Groner committed Jul 9, 2016
1 parent edd3fa3 commit 6d226e8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions apx/lib/graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,9 @@ class Graphics(object):
See http://cairographics.org/documentation/pycairo/2/reference/context.html
for detailed description of the cairo drawing functions.
"""
__slots__ = ('context', 'colors', 'extents', 'paths', '_last_matrix',
__slots__ = ('context', 'extents', 'paths', '_last_matrix',
'__new_instructions', '__instruction_cache', 'cache_surface',
'_cache_layout')
colors = Colors # pointer to the color utilities instance

def __init__(self, context = None):
self.context = context
Expand Down Expand Up @@ -327,7 +326,7 @@ def set_color(self, color, alpha = 1):
also consider skipping this operation and specify the color on stroke and
fill.
"""
color = self.colors.parse(color) # parse whatever we have there into a normalized triplet
color = Colors.parse(color) # parse whatever we have there into a normalized triplet
if len(color) == 4 and alpha is None:
alpha = color[3]
r, g, b = color[:3]
Expand Down Expand Up @@ -1784,9 +1783,6 @@ def __init__(self, interactive = True, framerate = 60,
if pytweener:
self.tweener = pytweener.Tweener(0.4, pytweener.Easing.Cubic.ease_in_out)

#: instance of :class:`ColorUtils` class for color parsing
self.colors = Colors

#: read only info about current framerate (frames per second)
self.fps = None # inner frames per second counter

Expand Down

0 comments on commit 6d226e8

Please sign in to comment.