From 824dd3c4e6a42dbdb032f93ccfc050e5edb9b242 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sun, 31 Dec 2017 22:05:05 -0500 Subject: [PATCH] don't mirror Y axis for patches --- embroider_simulate.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/embroider_simulate.py b/embroider_simulate.py index 6db203add..2d913bbb7 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)))