don't mirror Y axis for patches

pull/10/head
Lex Neva 2017-12-31 22:05:05 -05:00
rodzic 85aafccf25
commit 824dd3c4e6
1 zmienionych plików z 6 dodań i 2 usunięć

Wyświetl plik

@ -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)))