From: Eunki, Hong Date: Tue, 7 Nov 2023 11:15:26 +0000 (+0900) Subject: (AnimatedVector) Make API to get marker information X-Git-Tag: dali_2.2.52~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F39%2F301039%2F1;p=platform%2Fcore%2Fuifw%2Fdali-extension.git (AnimatedVector) Make API to get marker information Change-Id: I2ed04426323701c96ca4915f016336d67f67fc69 Signed-off-by: Eunki, Hong --- diff --git a/dali-extension/vector-animation-renderer/tizen-vector-animation-renderer.cpp b/dali-extension/vector-animation-renderer/tizen-vector-animation-renderer.cpp index bec6d14..810709a 100644 --- a/dali-extension/vector-animation-renderer/tizen-vector-animation-renderer.cpp +++ b/dali-extension/vector-animation-renderer/tizen-vector-animation-renderer.cpp @@ -390,6 +390,23 @@ bool TizenVectorAnimationRenderer::GetMarkerInfo(const std::string& marker, uint return false; } +void TizenVectorAnimationRenderer::GetMarkerInfo(Property::Map& map) const +{ + Dali::Mutex::ScopedLock lock(mMutex); + + if(mVectorRenderer) + { + auto markerList = mVectorRenderer->markers(); + for(auto&& iter : markerList) + { + Property::Array frames; + frames.PushBack(std::get<1>(iter)); + frames.PushBack(std::get<2>(iter)); + map.Add(std::get<0>(iter), frames); + } + } +} + void TizenVectorAnimationRenderer::InvalidateBuffer() { Dali::Mutex::ScopedLock lock(mMutex); diff --git a/dali-extension/vector-animation-renderer/tizen-vector-animation-renderer.h b/dali-extension/vector-animation-renderer/tizen-vector-animation-renderer.h index ae7c415..9341d97 100644 --- a/dali-extension/vector-animation-renderer/tizen-vector-animation-renderer.h +++ b/dali-extension/vector-animation-renderer/tizen-vector-animation-renderer.h @@ -112,6 +112,11 @@ public: bool GetMarkerInfo(const std::string& marker, uint32_t& startFrame, uint32_t& endFrame) const override; /** + * @copydoc Dali::VectorAnimationRendererPlugin::GetMarkerInfo() + */ + void GetMarkerInfo(Property::Map& map) const override; + + /** * @copydoc Dali::VectorAnimationRendererPlugin::InvalidateBuffer() */ void InvalidateBuffer() override; @@ -146,8 +151,8 @@ private: private: using SurfacePair = std::pair; - std::string mUrl; ///< The content file path - std::vector mBuffers; ///< EGL Image vector + std::string mUrl; ///< The content file path + std::vector mBuffers; ///< EGL Image vector std::vector> mPropertyCallbacks; ///< Property callback list mutable Dali::Mutex mMutex; ///< Mutex