projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[4.0] (AnimatedVectorImageVisual) Use the content default size
[platform/core/uifw/dali-toolkit.git]
/
automated-tests
/
src
/
dali-toolkit
/
dali-toolkit-test-utils
/
toolkit-vector-animation-renderer.cpp
diff --git
a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-vector-animation-renderer.cpp
b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-vector-animation-renderer.cpp
index
869bbc2
..
fbc24bf
100755
(executable)
--- a/
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-vector-animation-renderer.cpp
+++ b/
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-vector-animation-renderer.cpp
@@
-43,17
+43,26
@@
public:
void SetRenderer( Dali::Renderer renderer )
{
mRenderer = renderer;
void SetRenderer( Dali::Renderer renderer )
{
mRenderer = renderer;
+
+ if( mWidth != 0 && mHeight != 0 )
+ {
+ Dali::TextureSet textureSet = mRenderer.GetTextures();
+ Dali::Texture texture = Dali::Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, mWidth, mHeight );
+ textureSet.SetTexture( 0, texture );
+ }
}
void SetSize( uint32_t width, uint32_t height )
{
mWidth = width;
mHeight = height;
}
void SetSize( uint32_t width, uint32_t height )
{
mWidth = width;
mHeight = height;
- }
- bool StartRender()
- {
- return true;
+ if( mRenderer )
+ {
+ Dali::TextureSet textureSet = mRenderer.GetTextures();
+ Dali::Texture texture = Dali::Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, mWidth, mHeight );
+ textureSet.SetTexture( 0, texture );
+ }
}
void StopRender()
}
void StopRender()
@@
-74,13
+83,18
@@
public:
return 60.0f;
}
return 60.0f;
}
+ void GetDefaultSize( uint32_t& width, uint32_t& height ) const
+ {
+ width = 100;
+ height = 100;
+ }
+
public:
std::string mUrl;
Dali::Renderer mRenderer;
uint32_t mWidth;
uint32_t mHeight;
public:
std::string mUrl;
Dali::Renderer mRenderer;
uint32_t mWidth;
uint32_t mHeight;
-
};
inline VectorAnimationRenderer& GetImplementation( Dali::VectorAnimationRenderer& renderer )
};
inline VectorAnimationRenderer& GetImplementation( Dali::VectorAnimationRenderer& renderer )
@@
-147,11
+161,6
@@
void VectorAnimationRenderer::SetSize( uint32_t width, uint32_t height )
Internal::Adaptor::GetImplementation( *this ).SetSize( width, height );
}
Internal::Adaptor::GetImplementation( *this ).SetSize( width, height );
}
-bool VectorAnimationRenderer::StartRender()
-{
- return Internal::Adaptor::GetImplementation( *this ).StartRender();
-}
-
void VectorAnimationRenderer::StopRender()
{
Internal::Adaptor::GetImplementation( *this ).StopRender();
void VectorAnimationRenderer::StopRender()
{
Internal::Adaptor::GetImplementation( *this ).StopRender();
@@
-172,5
+181,10
@@
float VectorAnimationRenderer::GetFrameRate() const
return Internal::Adaptor::GetImplementation( *this ).GetFrameRate();
}
return Internal::Adaptor::GetImplementation( *this ).GetFrameRate();
}
+void VectorAnimationRenderer::GetDefaultSize( uint32_t& width, uint32_t& height ) const
+{
+ Internal::Adaptor::GetImplementation( *this ).GetDefaultSize( width, height );
+}
+
} // namespace Dali;
} // namespace Dali;