/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <dali/devel-api/adaptor-framework/vector-animation-renderer.h>
#include <dali/devel-api/threading/mutex.h>
#include <dali/public-api/object/base-object.h>
+#include <dali/public-api/object/property-array.h>
#include <toolkit-application.h>
#include <toolkit-event-thread-callback.h>
#include <toolkit-vector-animation-renderer.h>
return true;
}
+ bool Load(const Dali::Vector<uint8_t>& data)
+ {
+ Dali::Mutex::ScopedLock lock(mMutex);
+
+ mDefaultWidth = 100;
+ mDefaultHeight = 100;
+
+ return true;
+ }
+
void SetRenderer(Dali::Renderer renderer)
{
mRenderer = renderer;
return Internal::Adaptor::GetImplementation(*this).Load(url);
}
+bool VectorAnimationRenderer::Load(const Dali::Vector<uint8_t>& data)
+{
+ return Internal::Adaptor::GetImplementation(*this).Load(data);
+}
+
void VectorAnimationRenderer::SetRenderer(Renderer renderer)
{
Internal::Adaptor::GetImplementation(*this).SetRenderer(renderer);
return Internal::Adaptor::GetImplementation(*this).Render(frameNumber);
}
+void VectorAnimationRenderer::RenderStopped()
+{
+}
+
uint32_t VectorAnimationRenderer::GetTotalFrameNumber() const
{
return Internal::Adaptor::GetImplementation(*this).GetTotalFrameNumber();
return Internal::Adaptor::GetImplementation(*this).GetMarkerInfo(marker, startFrame, endFrame);
}
+void VectorAnimationRenderer::GetMarkerInfo(Property::Map& map) const
+{
+ map.Add(VECTOR_ANIMATION_MARKER_NAME_1, Property::Array({VECTOR_ANIMATION_MARKER_START_FRAME_1, VECTOR_ANIMATION_MARKER_END_FRAME_1}));
+ map.Add(VECTOR_ANIMATION_MARKER_NAME_2, Property::Array({VECTOR_ANIMATION_MARKER_START_FRAME_2, VECTOR_ANIMATION_MARKER_END_FRAME_2}));
+}
+
void VectorAnimationRenderer::InvalidateBuffer()
{
return Internal::Adaptor::GetImplementation(*this).InvalidateBuffer();