summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml13
-rwxr-xr-xbin/build-distribution-archives13
-rw-r--r--lib/gui/simulator.py12
3 files changed, 36 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml
index 85a48f60..822aff46 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -27,6 +27,19 @@ matrix:
if: type != cron AND (tag =~ ^v[0-9.]+$ OR branch != master)
- language: generic
os: osx
+ osx_image: xcode10.2
+ sudo: required
+ env: BUILD=osx
+ if: type != cron AND (tag =~ ^v[0-9.]+$ OR branch != master)
+ - language: generic
+ os: osx
+ osx_image: xcode9.4
+ sudo: required
+ env: BUILD=osx
+ if: type != cron AND (tag =~ ^v[0-9.]+$ OR branch != master)
+ - language: generic
+ os: osx
+ osx_image: xcode9.2
sudo: required
env: BUILD=osx
if: type != cron AND (tag =~ ^v[0-9.]+$ OR branch != master)
diff --git a/bin/build-distribution-archives b/bin/build-distribution-archives
index 1015d246..bbc61996 100755
--- a/bin/build-distribution-archives
+++ b/bin/build-distribution-archives
@@ -3,6 +3,15 @@ VERSION="$(echo ${TRAVIS_BRANCH} | tr / -)"
OS="${TRAVIS_OS_NAME}"
ARCH="$(uname -m)"
+MACVERSION="${TRAVIS_OSX_IMAGE}"
+if [ ${MACVERSION} = "xcode9.2" ]; then
+ MACVERSION="sierra"
+elif [ ${MACVERSION} = "xcode9.4" ]; then
+ MACVERSION="high_sierra"
+elif [ ${MACVERSION} = "xcode10.2" ]; then
+ MACVERSION="mojave"
+fi
+
cp -a images/examples palettes symbols fonts dist/inkstitch
cp -a icons locales print dist/inkstitch/bin
@@ -20,8 +29,10 @@ for d in inx/*; do
cd dist
if [ "$BUILD" = "windows" ]; then
zip -r ../inkstitch-${VERSION}-win32-${lang}.zip *
+ elif [ "$BUILD" = "osx" ]; then
+ tar zcf ../inkstitch-${VERSION}-${OS}-${MACVERSION}-${ARCH}-$lang.tar.gz *
else
tar zcf ../inkstitch-${VERSION}-${OS}-${ARCH}-$lang.tar.gz *
fi
cd ..
-done \ No newline at end of file
+done
diff --git a/lib/gui/simulator.py b/lib/gui/simulator.py
index 7184a012..48709cb8 100644
--- a/lib/gui/simulator.py
+++ b/lib/gui/simulator.py
@@ -363,6 +363,12 @@ class DrawingPanel(wx.Panel):
dc = wx.PaintDC(self)
canvas = wx.GraphicsContext.Create(dc)
+ self.draw_stitches(canvas)
+ self.draw_scale(canvas)
+
+ def draw_stitches(self, canvas):
+ canvas.BeginLayer(1)
+
transform = canvas.GetTransform()
transform.Translate(*self.pan)
transform.Scale(self.zoom / self.PIXEL_DENSITY, self.zoom / self.PIXEL_DENSITY)
@@ -392,7 +398,7 @@ class DrawingPanel(wx.Panel):
if last_stitch:
self.draw_crosshair(last_stitch[0], last_stitch[1], canvas, transform)
- self.draw_scale(canvas)
+ canvas.EndLayer()
def draw_crosshair(self, x, y, canvas, transform):
x, y = transform.TransformPoint(float(x), float(y))
@@ -403,6 +409,8 @@ class DrawingPanel(wx.Panel):
canvas.DrawLines(((x, y - crosshair_radius), (x, y + crosshair_radius)))
def draw_scale(self, canvas):
+ canvas.BeginLayer(1)
+
canvas_width, canvas_height = self.GetClientSize()
one_mm = PIXELS_PER_MM * self.zoom
@@ -436,6 +444,8 @@ class DrawingPanel(wx.Panel):
canvas.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.NORMAL), wx.Colour((0, 0, 0)))
canvas.DrawText("%s mm" % scale_width_mm, scale_lower_left_x, scale_lower_left_y + 5)
+ canvas.EndLayer()
+
def draw_needle_penetration_points(self, canvas, pen, stitches):
if self.control_panel.nppBtn.GetValue():
npp_pen = wx.Pen(pen.GetColour(), width=int(0.3 * PIXELS_PER_MM * self.PIXEL_DENSITY))