diff --git a/.travis.yml b/.travis.yml index 4f2008c..5fea3a7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -71,7 +71,7 @@ after_script: - if [ "$GCOV" != "" ]; then ./ci/warning_send.py --find-path ./out/Linux_x86_64/$CONF/build/$BUILDER/esvg/; fi - - ./out/Linux_x86_64/$CONF/staging/$BUILDER/esvg-test/esvg-test.app/bin/esvg-test --etk-log-level=6 | tee out_test.txt + - ./out/Linux_x86_64/$CONF/staging/$BUILDER/esvg-test/esvg-test.app/bin/esvg-test --etk-log-level=3 | tee out_test.txt - if [ "$GCOV" != "" ]; then ./ci/test_send.py --file=out_test.txt; lutin -C -P -t $TARGET -c $BUILDER $COMPILATOR_OPTION $BUS -m $CONF -p esvg?gcov; diff --git a/esvg/render/Path.cpp b/esvg/render/Path.cpp index 4c877c8..b1c19b6 100644 --- a/esvg/render/Path.cpp +++ b/esvg/render/Path.cpp @@ -101,8 +101,13 @@ void interpolateCubicBezier(std::vector& _listPoint, vec2 pos34 = (_pos3+_pos4)*0.5f; vec2 delta = _pos4 - _pos1; - float distance2 = std::abs(((_pos2.x() - _pos4.x()) * delta.y() - (_pos2.y() - _pos4.y()) * delta.x() )); - float distance3 = std::abs(((_pos3.x() - _pos4.x()) * delta.y() - (_pos3.y() - _pos4.y()) * delta.x() )); + #if __CPP_VERSION__ >= 2011 && !defined(__TARGET_OS__MacOs) && !defined(__TARGET_OS__IOs) + float distance2 = std::abs(((_pos2.x() - _pos4.x()) * delta.y() - (_pos2.y() - _pos4.y()) * delta.x() )); + float distance3 = std::abs(((_pos3.x() - _pos4.x()) * delta.y() - (_pos3.y() - _pos4.y()) * delta.x() )); + #else + float distance2 = fabs(((_pos2.x() - _pos4.x()) * delta.y() - (_pos2.y() - _pos4.y()) * delta.x() )); + float distance3 = fabs(((_pos3.x() - _pos4.x()) * delta.y() - (_pos3.y() - _pos4.y()) * delta.x() )); + #endif if ((distance2 + distance3)*(distance2 + distance3) < _threshold * delta.length2()) { _listPoint.push_back(esvg::render::Point(_pos4, _type) ); diff --git a/esvg/render/Weight.cpp b/esvg/render/Weight.cpp index 5fe8e9a..db572bd 100644 --- a/esvg/render/Weight.cpp +++ b/esvg/render/Weight.cpp @@ -165,7 +165,11 @@ void esvg::render::Weight::generate(ivec2 _size, int32_t _subSamplingCount, cons for (auto &it : listPosition) { if (currentPos != int32_t(it.first)) { // fill to the new pos -1: - float endValue = float(std::min(1,std::abs(lastState))) * deltaSize; + #if __CPP_VERSION__ >= 2011 && !defined(__TARGET_OS__MacOs) && !defined(__TARGET_OS__IOs) + float endValue = float(std::min(1,std::abs(lastState))) * deltaSize; + #else + float endValue = float(std::min(1,abs(lastState))) * deltaSize; + #endif for (int32_t iii=currentPos+1; iii