-#ifdef NO_THORVG
- if( mParsedSvg != NULL && mWidth > 0u && mHeight > 0u )
- {
- float scaleX = static_cast<float>( mWidth ) / mParsedSvg->width;
- float scaleY = static_cast<float>( mHeight ) / mParsedSvg->height;
- float scale = scaleX < scaleY ? scaleX : scaleY;
- unsigned int bufferStride = mWidth*Pixel::GetBytesPerPixel( Pixel::RGBA8888 );
- unsigned int bufferSize = bufferStride * mHeight;
-
- unsigned char* buffer = new unsigned char [bufferSize];
- nsvgRasterize(mRasterizer, mParsedSvg, 0.f,0.f,scale,
- buffer, mWidth, mHeight,
- bufferStride );
-
- mPixelData = Dali::PixelData::New( buffer, bufferSize, mWidth, mHeight, Pixel::RGBA8888, Dali::PixelData::DELETE_ARRAY );
- }
-#else /* NO_THORVG */
- if ( mWidth <= 0u || mHeight <= 0u )