diff options
| author | Lex Neva <github.com@lexneva.name> | 2023-02-05 22:58:17 -0500 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2023-02-20 15:27:55 -0500 |
| commit | 8dde33d867afce7ea4aa212dfce60e9e526bbc1c (patch) | |
| tree | dbde1b5e348f89520f91defecce568628470c632 /lib/tiles.py | |
| parent | 39b3db0165e947f317f181f6e4498f496957e57e (diff) | |
make meander interruptible
Diffstat (limited to 'lib/tiles.py')
| -rw-r--r-- | lib/tiles.py | 3 |
1 files changed, 3 insertions, 0 deletions
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) |
