// a set of libraries for developing nice desktop applications. // // For license and copyright information please follow this link: // https://github.com/desktop-app/legal/blob/master/LEGAL // #pragma once #include "base/debug_log.h" #include #if __has_include() #include #endif namespace Lottie { inline std::unique_ptr LoadAnimationFromData( std::string jsonData, const std::string &key, const std::string &resourcePath = "", bool cachePolicy = true, const std::vector> &colorReplacements = {}, rlottie::FitzModifier fitzModifier = rlottie::FitzModifier::None) { #ifdef LOTTIE_DISABLE_RECOLORING [[maybe_unused]] static auto logged = [&] { const auto text = "Lottie recoloring is disabled by the distributor, " "expect animations with color issues."; LOG((text)); #if __has_include() g_warning(text); #endif // __has_include() return true; }(); #endif // LOTTIE_DISABLE_RECOLORING return rlottie::Animation::loadFromData( std::move(jsonData), key, resourcePath, cachePolicy #ifndef LOTTIE_DISABLE_RECOLORING ,std::move(colorReplacements), fitzModifier #endif // !LOTTIE_DISABLE_RECOLORING ); } } // namespace Lottie