From 8dde33d867afce7ea4aa212dfce60e9e526bbc1c Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sun, 5 Feb 2023 22:58:17 -0500 Subject: make meander interruptible --- lib/tiles.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/tiles.py') diff --git a/lib/tiles.py b/lib/tiles.py index 17002ffa..5d33d946 100644 --- a/lib/tiles.py +++ b/lib/tiles.py @@ -10,6 +10,7 @@ from shapely.prepared import prep from .debug import debug from .svg import apply_transforms from .utils import Point, cache, get_bundled_dir, guess_inkscape_config_path +from .utils.threading import check_stop_flag class Tile: @@ -145,6 +146,8 @@ class Tile: tiles1 = ceil(shape_diagonal / self.shift1.length()) + 2 for repeat0 in range(floor(-tiles0 / 2), ceil(tiles0 / 2)): for repeat1 in range(floor(-tiles1 / 2), ceil(tiles1 / 2)): + check_stop_flag() + shift0 = repeat0 * self.shift0 shift1 = repeat1 * self.shift1 this_tile = self._translate_tile(shift0 + shift1 + shape_center) -- cgit v1.2.3