diff --git a/.travis.yml b/.travis.yml index 4accd75b..a51c83d1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,10 @@ language: objective-c -osx_image: xcode9 +osx_image: xcode9.2 branches: only: - master script: - set -o pipefail && xcodebuild test -project Macaw.xcodeproj -scheme 'Macaw iOS' -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO -destination 'platform=iOS Simulator,name=iPhone 6,OS=11.0' | xcpretty; + - set -o pipefail && xcodebuild test -project Macaw.xcodeproj -scheme 'Macaw iOS' -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO -destination 'platform=iOS Simulator,name=iPhone 6,OS=11.2' | xcpretty; + - set -o pipefail && xcodebuild build -project Macaw.xcodeproj -scheme 'MacawOSX' ONLY_ACTIVE_ARCH=NO | xcpretty; \ No newline at end of file diff --git a/Source/render/RenderUtils.swift b/Source/render/RenderUtils.swift index f6aa731e..20471be7 100644 --- a/Source/render/RenderUtils.swift +++ b/Source/render/RenderUtils.swift @@ -422,10 +422,18 @@ class RenderUtils { } else { let maxSize = CGFloat(max(w, h)) let path = MBezierPath(arcCenter: CGPoint.zero, radius: maxSize / 2, startAngle: extent, endAngle: end, clockwise: arcAngle >= 0) - var transform = CGAffineTransform(translationX: cx, y: cy) - transform = transform.rotated(by: CGFloat(rotation)) - - path.apply(transform.scaledBy(x: CGFloat(w) / maxSize, y: CGFloat(h) / maxSize)) + + #if os(iOS) + var transform = CGAffineTransform(translationX: cx, y: cy) + transform = transform.rotated(by: CGFloat(rotation)) + path.apply(transform.scaledBy(x: CGFloat(w) / maxSize, y: CGFloat(h) / maxSize)) + #elseif os(OSX) + var transform = AffineTransform(translationByX: cx, byY: cy) + transform.rotate(byDegrees: CGFloat(rotation)) + path.transform(using: transform) + #endif + + bezierPath.append(path) } }