X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fvisual-base-impl.cpp;h=99b6c38040ea24828dca0e4dfa3eb687ec272ad9;hp=b50cc59fc04ed331fb893af338d7914f74dec5c9;hb=65233ffeec86a52a2f0a06608d10d752c3ac2869;hpb=aa6d5ffc76e7c5ad6785a4a426b9b6ba2ef4d99b diff --git a/dali-toolkit/internal/visuals/visual-base-impl.cpp b/dali-toolkit/internal/visuals/visual-base-impl.cpp index b50cc59..99b6c38 100644 --- a/dali-toolkit/internal/visuals/visual-base-impl.cpp +++ b/dali-toolkit/internal/visuals/visual-base-impl.cpp @@ -27,6 +27,7 @@ #include //INTERNAL HEARDER +#include #include #include #include @@ -295,7 +296,7 @@ void Visual::Base::SetProperties(const Property::Map& propertyMap) mImpl->mBorderlineWidth = width; } - if(DALI_UNLIKELY(mImpl->mRenderer)) + if(DALI_UNLIKELY(mImpl->mRenderer && IsTypeAvailableForBorderline(mImpl->mType))) { // Unusual case. SetProperty called after OnInitialize(). // Assume that DoAction call UPDATE_PROPERTY. @@ -328,7 +329,7 @@ void Visual::Base::SetProperties(const Property::Map& propertyMap) mImpl->mBorderlineColor = color; } - if(DALI_UNLIKELY(mImpl->mRenderer)) + if(DALI_UNLIKELY(mImpl->mRenderer && IsTypeAvailableForBorderline(mImpl->mType))) { // Unusual case. SetProperty called after OnInitialize(). // Assume that DoAction call UPDATE_PROPERTY. @@ -344,7 +345,7 @@ void Visual::Base::SetProperties(const Property::Map& propertyMap) mImpl->mBorderlineOffset = offset; } - if(DALI_UNLIKELY(mImpl->mRenderer)) + if(DALI_UNLIKELY(mImpl->mRenderer && IsTypeAvailableForBorderline(mImpl->mType))) { // Unusual case. SetProperty called after OnInitialize(). // Assume that DoAction call UPDATE_PROPERTY. @@ -376,7 +377,7 @@ void Visual::Base::SetProperties(const Property::Map& propertyMap) } } - if(DALI_UNLIKELY(mImpl->mRenderer)) + if(DALI_UNLIKELY(mImpl->mRenderer && IsTypeAvailableForCornerRadius(mImpl->mType))) { // Unusual case. SetProperty called after OnInitialize(). // Assume that DoAction call UPDATE_PROPERTY. @@ -1233,18 +1234,34 @@ Dali::Property Visual::Base::GetPropertyObject(Dali::Property::Key key) } break; } - // Special case for MIX_COLOR default: { + // Special case for MIX_COLOR if(key.type == Property::Key::INDEX && ((mImpl->mType == Toolkit::Visual::COLOR && key.indexKey == ColorVisual::Property::MIX_COLOR) || (mImpl->mType == Toolkit::Visual::PRIMITIVE && key.indexKey == PrimitiveVisual::Property::MIX_COLOR))) { return Dali::Property(mImpl->mRenderer, VisualRenderer::Property::VISUAL_MIX_COLOR); } + + // Special case for BLUR_RADIUS + if(mImpl->mType == Toolkit::Visual::COLOR && + ((key.type == Property::Key::INDEX && key.indexKey == DevelColorVisual::Property::BLUR_RADIUS) || + (key.type == Property::Key::STRING && key.stringKey == BLUR_RADIUS_NAME))) + { + // Request to color-visual class + return OnGetPropertyObject(key); + } } } + // If it is not VisualRenderer property, check registered Renderer and Shader property. + Property::Index index = GetPropertyIndex(key); + if(index != Property::INVALID_INDEX) + { + return Dali::Property(mImpl->mRenderer, index); + } + // We can't find the property in the base class. // Request to child class return OnGetPropertyObject(key);