diff options
| author | Lex Neva <github.com@lexneva.name> | 2017-12-31 22:05:05 -0500 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2017-12-31 22:05:05 -0500 |
| commit | 824dd3c4e6a42dbdb032f93ccfc050e5edb9b242 (patch) | |
| tree | 90ee5cb0d23aa5e5c7cd24816a97315c8fb4b3cf /embroider_simulate.py | |
| parent | 85aafccf25621224426c9893610d581d7a6a24bb (diff) | |
don't mirror Y axis for patches
Diffstat (limited to 'embroider_simulate.py')
| -rw-r--r-- | embroider_simulate.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/embroider_simulate.py b/embroider_simulate.py index 6db203ad..2d913bbb 100644 --- a/embroider_simulate.py +++ b/embroider_simulate.py @@ -41,8 +41,10 @@ class EmbroiderySimulator(wx.Frame): def load(self, stitch_file=None, patches=None): if stitch_file: + self.mirror = True self.segments = self._parse_stitch_file(stitch_file) elif patches: + self.mirror = False self.segments = self._patches_to_segments(patches) else: return @@ -210,8 +212,10 @@ class EmbroiderySimulator(wx.Frame): for i in xrange(self.stitches_per_frame): try: ((x1, y1), (x2, y2)), color = self.segments[self.current_stitch] - y1 = self.height - y1 - y2 = self.height - y2 + + if self.mirror: + y1 = self.height - y1 + y2 = self.height - y2 self.canvas.SetPen(color) self.canvas.DrawLines(((x1, y1), (x2, y2))) |
