X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fnpatch%2Fnpatch-visual.cpp;h=3af7b727583551afc1fd8e53ef0a17899dfa2bf5;hb=caf7677175a0e8b9c690d4f2ab73adc295f22c0e;hp=60fdf585a8f8c7e1e0bed051caf4f870d61059b1;hpb=83066ea18044c04fbbf0378aa6863416c532e10b;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/visuals/npatch/npatch-visual.cpp b/dali-toolkit/internal/visuals/npatch/npatch-visual.cpp index 60fdf58..3af7b72 100644 --- a/dali-toolkit/internal/visuals/npatch/npatch-visual.cpp +++ b/dali-toolkit/internal/visuals/npatch/npatch-visual.cpp @@ -26,7 +26,7 @@ // INTERNAL INCLUDES #include -#include +#include #include #include #include @@ -226,9 +226,18 @@ void RegisterStretchProperties( Renderer& renderer, const char * uniformName, co /////////////////NPatchVisual//////////////// +NPatchVisualPtr NPatchVisual::New( VisualFactoryCache& factoryCache, const std::string& imageUrl, const Property::Map& properties ) +{ + NPatchVisualPtr nPatchVisual( new NPatchVisual( factoryCache ) ); + nPatchVisual->mImageUrl = imageUrl; + nPatchVisual->SetProperties( properties ); + + return nPatchVisual; +} + NPatchVisualPtr NPatchVisual::New( VisualFactoryCache& factoryCache, const std::string& imageUrl ) { - NPatchVisual* nPatchVisual = new NPatchVisual( factoryCache ); + NPatchVisualPtr nPatchVisual( new NPatchVisual( factoryCache ) ); nPatchVisual->mImageUrl = imageUrl; return nPatchVisual; @@ -236,7 +245,7 @@ NPatchVisualPtr NPatchVisual::New( VisualFactoryCache& factoryCache, const std:: NPatchVisualPtr NPatchVisual::New( VisualFactoryCache& factoryCache, NinePatchImage image ) { - NPatchVisual* nPatchVisual = new NPatchVisual( factoryCache ); + NPatchVisualPtr nPatchVisual( new NPatchVisual( factoryCache ) ); nPatchVisual->mImageUrl = image.GetUrl(); return nPatchVisual; @@ -304,22 +313,11 @@ void NPatchVisual::OnSetTransform() void NPatchVisual::DoCreatePropertyMap( Property::Map& map ) const { map.Clear(); - map.Insert( Toolkit::VisualProperty::TYPE, Toolkit::Visual::IMAGE ); + map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::Visual::IMAGE ); map.Insert( Toolkit::ImageVisual::Property::URL, mImageUrl ); map.Insert( Toolkit::ImageVisual::Property::BORDER_ONLY, mBorderOnly ); } -void NPatchVisual::DoSetProperty( Dali::Property::Index index, const Dali::Property::Value& propertyValue ) -{ - // TODO -} - -Dali::Property::Value NPatchVisual::DoGetProperty( Dali::Property::Index index ) -{ - // TODO - return Dali::Property::Value(); -} - NPatchVisual::NPatchVisual( VisualFactoryCache& factoryCache ) : Visual::Base( factoryCache ), mLoader( factoryCache.GetNPatchLoader() ),