From ff57ce43d7ae08580ebd3dbc7d3c1f872af4a959 Mon Sep 17 00:00:00 2001 From: Felix Pankratz Date: Wed, 15 Dec 2021 14:05:24 +0100 Subject: [PATCH] dont stroke; fill! --- waves.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/waves.py b/waves.py index 15a114e..186aa29 100755 --- a/waves.py +++ b/waves.py @@ -59,14 +59,10 @@ def main(): ctx.move_to(*points[0]) for p in points[1:]: ctx.line_to(*p) - ctx.set_line_width(step_size) #0.002) - ctx.stroke() - # fill area above - ctx.set_line_width(step_size) - for pos in range(len(points)): - ctx.move_to(*points[pos]) - ctx.line_to(*lastpoints[pos]) - ctx.stroke() + for p in reversed(lastpoints): + ctx.line_to(*p) + ctx.line_to(*points[0]) + ctx.fill() lastpoints = points