rlottie: fix windows build

This commit is contained in:
sub.mohanty@samsung.com 2019-06-29 20:27:09 +09:00 committed by Subhransu
parent e99767bb90
commit 11a11763dc
3 changed files with 5 additions and 4 deletions

View File

@ -1,7 +1,7 @@
#include "vimageloader.h" #include "vimageloader.h"
#include "config.h" #include "config.h"
#include "vdebug.h" #include "vdebug.h"
#ifndef WIN32 #ifndef _WIN32
#include <dlfcn.h> #include <dlfcn.h>
#else #else
#include <windows.h> #include <windows.h>
@ -36,7 +36,7 @@ struct VImageLoader::Impl {
lottie_image_load_data_f imageFromData{nullptr}; lottie_image_load_data_f imageFromData{nullptr};
#if LOTTIE_IMAGE_MODULE_SUPPORT #if LOTTIE_IMAGE_MODULE_SUPPORT
#ifdef WIN32 #ifdef _WIN32
HMODULE dl_handle{nullptr}; HMODULE dl_handle{nullptr};
bool moduleLoad() bool moduleLoad()
{ {

View File

@ -51,10 +51,11 @@ private:
inline float VLine::angle() const inline float VLine::angle() const
{ {
static constexpr float K_PI = 3.141592f;
const float dx = mX2 - mX1; const float dx = mX2 - mX1;
const float dy = mY2 - mY1; const float dy = mY2 - mY1;
const float theta = std::atan2(dy, dx) * 180.0 / M_PI; const float theta = std::atan2f(dy, dx) * 180.0f / K_PI;
return theta; return theta;
} }

View File

@ -144,7 +144,7 @@ void VPath::VPathData::reserve(size_t pts, size_t elms)
static VPointF curvesForArc(const VRectF &, float, float, VPointF *, size_t *); static VPointF curvesForArc(const VRectF &, float, float, VPointF *, size_t *);
static constexpr float PATH_KAPPA = 0.5522847498f; static constexpr float PATH_KAPPA = 0.5522847498f;
static constexpr float K_PI = float(M_PI); static constexpr float K_PI = 3.141592f;
void VPath::VPathData::arcTo(const VRectF &rect, float startAngle, void VPath::VPathData::arcTo(const VRectF &rect, float startAngle,
float sweepLength, bool forceMoveTo) float sweepLength, bool forceMoveTo)