X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fdevel-api%2Fadaptor-framework%2Fvector-animation-renderer.cpp;h=5663e816795a5a2a8b56abf16197a3fc5b12ad89;hb=87bc33f1fbbedcc4fbabfecc37b9030d8a8dfae5;hp=8daaba2d4f66eb96074b5923b490e7235db53e54;hpb=f6059c77a8d2119eb22db398f9dfe2000f4d4c8c;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 8daaba2..5663e81 --- 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) 2022 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,45 +37,85 @@ 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; } -void VectorAnimationRenderer::SetSize( uint32_t width, uint32_t height ) +void VectorAnimationRenderer::Finalize() +{ + GetImplementation(*this).Finalize(); +} + +bool VectorAnimationRenderer::Load(const std::string& url) +{ + return GetImplementation(*this).Load(url); +} + +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); +} + +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 ).SetSize( width, height ); + GetImplementation(*this).GetLayerInfo(map); } -bool VectorAnimationRenderer::StartRender() +bool VectorAnimationRenderer::GetMarkerInfo(const std::string& marker, uint32_t& startFrame, uint32_t& endFrame) const { - return GetImplementation( *this ).StartRender(); + return GetImplementation(*this).GetMarkerInfo(marker, startFrame, endFrame); } -void VectorAnimationRenderer::StopRender() +void VectorAnimationRenderer::InvalidateBuffer() { - GetImplementation( *this ).StopRender(); + GetImplementation(*this).InvalidateBuffer(); } -void VectorAnimationRenderer::Render( uint32_t frameNumber ) +void VectorAnimationRenderer::AddPropertyValueCallback(const std::string& keyPath, VectorProperty property, CallbackBase* callback, int32_t id) { - GetImplementation( *this ).Render( frameNumber ); + GetImplementation(*this).AddPropertyValueCallback(keyPath, property, callback, id); } -uint32_t VectorAnimationRenderer::GetTotalFrameNumber() +VectorAnimationRenderer::UploadCompletedSignalType& VectorAnimationRenderer::UploadCompletedSignal() { - return GetImplementation( *this ).GetTotalFrameNumber(); + return GetImplementation(*this).UploadCompletedSignal(); } } // namespace Dali