Commit 1dade87d authored by gijs's avatar gijs

Better multicolor?

parent e7a6cc23
......@@ -50,13 +50,22 @@ def ploteps():
pen = 1
pencount = 4
penmap = {}
for chunk in dirtyhpgl.split(';'):
if chunk[0:2] in ['PA', 'PR', 'PU', 'PD']:
cleanhpglchunks.append(chunk)
elif chunk[0:2] == 'SP':
pen = int(chunk[2]) % pencount
cleanhpglchunks.append('SP{}'.format(pen))
sourcepen = int(chunk[2])
if not sourcepen in penmap:
pen += 1
if pen > pencount:
pen = 1
penmap[sourcepen] = pen
cleanhpglchunks.append('SP{}'.format(penmap[sourcepen]))
cleanhpgl = ';'.join(cleanhpglchunks)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment