- float scaleX = static_cast<float>( mWidth ) / mParsedSvg->width;
- float scaleY = static_cast<float>( mHeight ) / mParsedSvg->height;
+ return;
+ }
+
+ if( !mUrl.IsLocalResource() )
+ {
+ Dali::Vector<uint8_t> remoteBuffer;
+
+ if( !Dali::FileLoader::DownloadFileSynchronously( mUrl.GetUrl(), remoteBuffer ))
+ {
+ DALI_LOG_ERROR("Failed to download file!\n");
+ return;
+ }
+
+ remoteBuffer.PushBack( '\0' );
+ mParsedSvg = nsvgParse( reinterpret_cast<char*>(remoteBuffer.begin()), UNITS, mDpi );
+ }
+}
+
+void RasterizingTask::Rasterize( )
+{
+ if( mParsedSvg != NULL && mWidth > 0u && mHeight > 0u )
+ {
+ float scaleX = static_cast<float>( mWidth ) / mParsedSvg->width;
+ float scaleY = static_cast<float>( mHeight ) / mParsedSvg->height;