aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Friedrich Bolz-Tereick <cfbolz@gmx.de>2021-04-27 11:44:27 +0200
committerCarl Friedrich Bolz-Tereick <cfbolz@gmx.de>2021-04-27 11:44:27 +0200
commit4d83c96b6a41458f3308e5911cbadb50662242fd (patch)
tree9180376f94f9f1000450623afcb3ab2fe47f134c /dotviewer
parentkill debug output (diff)
downloadpypy-4d83c96b6a41458f3308e5911cbadb50662242fd.tar.gz
pypy-4d83c96b6a41458f3308e5911cbadb50662242fd.tar.bz2
pypy-4d83c96b6a41458f3308e5911cbadb50662242fd.zip
fix
Diffstat (limited to 'dotviewer')
-rw-r--r--dotviewer/drawgraph.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/dotviewer/drawgraph.py b/dotviewer/drawgraph.py
index cec5363fe9..e566bd5e74 100644
--- a/dotviewer/drawgraph.py
+++ b/dotviewer/drawgraph.py
@@ -1152,7 +1152,7 @@ class GraphRenderer:
x = xcenter-boxwidth//2
y = ycenter-boxheight//2
- if node.shape == 'box':
+ if node.shape == b'box':
rect = (x-1, y-1, boxwidth+2, boxheight+2)
def cmd():
self.screen.fill(bgcolor, rect)
@@ -1160,7 +1160,7 @@ class GraphRenderer:
def cmd():
pygame.draw.rect(self.screen, fgcolor, rect, 1)
commands.append(cmd)
- elif node.shape == 'ellipse':
+ elif node.shape == b'ellipse':
rect = (x-1, y-1, boxwidth+2, boxheight+2)
def cmd():
pygame.draw.ellipse(self.screen, bgcolor, rect, 0)
@@ -1168,7 +1168,7 @@ class GraphRenderer:
def cmd():
pygame.draw.ellipse(self.screen, fgcolor, rect, 1)
commands.append(cmd)
- elif node.shape == 'octagon':
+ elif node.shape == b'octagon':
step = 1-math.sqrt(2)/2
points = [(int(x+boxwidth*fx), int(y+boxheight*fy))
for fx, fy in [(step,0), (1-step,0),