mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-09 07:41:40 +00:00
rlottie: fix windows build
This commit is contained in:
parent
e99767bb90
commit
11a11763dc
@ -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()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user