File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,9 +39,13 @@ def render(
3939 win = pygame .display .set_mode ((int (dpi * width ), int (dpi * height )))
4040 rng = np .random .default_rng ()
4141 if layer_colors is not None :
42- my_colors = layer_colors + [_random_color (rng ) for _ in range (len (layers ) - len (layer_colors ))]
42+ my_colors = layer_colors + [
43+ _random_color (rng ) for _ in range (len (layers ) - len (layer_colors ))
44+ ]
4345 else :
44- my_colors = COLORS + [_random_color (rng ) for _ in range (len (layers ) - len (COLORS ))]
46+ my_colors = COLORS + [
47+ _random_color (rng ) for _ in range (len (layers ) - len (COLORS ))
48+ ]
4549 run = True
4650 first_run = True
4751 while run :
@@ -55,7 +59,7 @@ def render(
5559 color = my_colors [i ]
5660 path : shapely .LineString
5761 for path in shapely .get_parts (layer ):
58- screen_coords = [(dpi * x , dpi * ( height - y ) ) for x , y in path .coords ]
62+ screen_coords = [(dpi * x , dpi * y ) for x , y in path .coords ]
5963 pygame .draw .aalines (win , color , False , screen_coords )
6064 pygame .display .flip ()
6165 first_run = False
You can’t perform that action at this time.
0 commit comments