X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fdevel-api%2Fadaptor-framework%2Fvector-animation-renderer.cpp;h=ee2651488a6db4fe40d1e73faa9d2b23b76f3061;hb=HEAD;hp=334974104ed15d8a5bed9a7b7457f32464926004;hpb=361480c3a72b189b3c11980de011d233b4aea721;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/devel-api/adaptor-framework/vector-animation-renderer.cpp b/dali/devel-api/adaptor-framework/vector-animation-renderer.cpp old mode 100755 new mode 100644 index 3349741..ee26514 --- a/dali/devel-api/adaptor-framework/vector-animation-renderer.cpp +++ b/dali/devel-api/adaptor-framework/vector-animation-renderer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 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. @@ -23,16 +23,10 @@ namespace Dali { - -VectorAnimationRenderer VectorAnimationRenderer::New( const std::string& url, Renderer renderer, uint32_t width, uint32_t height ) +VectorAnimationRenderer VectorAnimationRenderer::New() { Internal::Adaptor::VectorAnimationRendererPtr animationRenderer = Internal::Adaptor::VectorAnimationRenderer::New(); - if( animationRenderer ) - { - animationRenderer->Initialize( url, renderer, width, height ); - } - - return VectorAnimationRenderer( animationRenderer.Get() ); + return VectorAnimationRenderer(animationRenderer.Get()); } VectorAnimationRenderer::VectorAnimationRenderer() @@ -43,40 +37,105 @@ VectorAnimationRenderer::~VectorAnimationRenderer() { } -VectorAnimationRenderer::VectorAnimationRenderer( Internal::Adaptor::VectorAnimationRenderer* internal ) -: BaseHandle( internal ) +VectorAnimationRenderer::VectorAnimationRenderer(Internal::Adaptor::VectorAnimationRenderer* internal) +: BaseHandle(internal) { } -VectorAnimationRenderer::VectorAnimationRenderer( const VectorAnimationRenderer& handle ) -: BaseHandle( handle ) +VectorAnimationRenderer::VectorAnimationRenderer(const VectorAnimationRenderer& handle) +: BaseHandle(handle) { } -VectorAnimationRenderer& VectorAnimationRenderer::operator=( const VectorAnimationRenderer& rhs ) +VectorAnimationRenderer& VectorAnimationRenderer::operator=(const VectorAnimationRenderer& rhs) { - BaseHandle::operator=( rhs ); + BaseHandle::operator=(rhs); return *this; } -bool VectorAnimationRenderer::StartRender() +void VectorAnimationRenderer::Finalize() +{ + GetImplementation(*this).Finalize(); +} + +bool VectorAnimationRenderer::Load(const std::string& url) +{ + return GetImplementation(*this).Load(url); +} + +bool VectorAnimationRenderer::Load(const Dali::Vector& data) +{ + return GetImplementation(*this).Load(data); +} + +void VectorAnimationRenderer::SetRenderer(Renderer renderer) +{ + GetImplementation(*this).SetRenderer(renderer); +} + +void VectorAnimationRenderer::SetSize(uint32_t width, uint32_t height) +{ + GetImplementation(*this).SetSize(width, height); +} + +bool VectorAnimationRenderer::Render(uint32_t frameNumber) +{ + return GetImplementation(*this).Render(frameNumber); +} + +void VectorAnimationRenderer::RenderStopped() +{ + GetImplementation(*this).RenderStopped(); +} + +uint32_t VectorAnimationRenderer::GetTotalFrameNumber() const +{ + return GetImplementation(*this).GetTotalFrameNumber(); +} + +float VectorAnimationRenderer::GetFrameRate() const +{ + return GetImplementation(*this).GetFrameRate(); +} + +void VectorAnimationRenderer::GetDefaultSize(uint32_t& width, uint32_t& height) const +{ + GetImplementation(*this).GetDefaultSize(width, height); +} + +void VectorAnimationRenderer::GetLayerInfo(Property::Map& map) const +{ + GetImplementation(*this).GetLayerInfo(map); +} + +bool VectorAnimationRenderer::GetMarkerInfo(const std::string& marker, uint32_t& startFrame, uint32_t& endFrame) const +{ + return GetImplementation(*this).GetMarkerInfo(marker, startFrame, endFrame); +} + +void VectorAnimationRenderer::GetMarkerInfo(Property::Map& map) const +{ + GetImplementation(*this).GetMarkerInfo(map); +} + +void VectorAnimationRenderer::InvalidateBuffer() { - return GetImplementation( *this ).StartRender(); + GetImplementation(*this).InvalidateBuffer(); } -void VectorAnimationRenderer::StopRender() +void VectorAnimationRenderer::AddPropertyValueCallback(const std::string& keyPath, VectorProperty property, CallbackBase* callback, int32_t id) { - GetImplementation( *this ).StopRender(); + GetImplementation(*this).AddPropertyValueCallback(keyPath, property, callback, id); } -void VectorAnimationRenderer::Render( uint32_t frameNumber ) +void VectorAnimationRenderer::KeepRasterizedBuffer() { - GetImplementation( *this ).Render( frameNumber ); + GetImplementation(*this).KeepRasterizedBuffer(); } -uint32_t VectorAnimationRenderer::GetTotalFrameNumber() +VectorAnimationRenderer::UploadCompletedSignalType& VectorAnimationRenderer::UploadCompletedSignal() { - return GetImplementation( *this ).GetTotalFrameNumber(); + return GetImplementation(*this).UploadCompletedSignal(); } } // namespace Dali