2 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include "visual-base-impl.h"
22 #include <dali-toolkit/public-api/dali-toolkit-common.h>
23 #include <dali/devel-api/rendering/renderer-devel.h>
24 #include <dali/devel-api/scripting/enum-helper.h>
25 #include <dali/integration-api/debug.h>
28 #include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
29 #include <dali-toolkit/internal/helpers/property-helper.h>
30 #include <dali-toolkit/internal/visuals/visual-base-data-impl.h>
31 #include <dali-toolkit/internal/visuals/visual-string-constants.h>
32 #include <dali-toolkit/public-api/visuals/color-visual-properties.h>
33 #include <dali-toolkit/public-api/visuals/primitive-visual-properties.h>
34 #include <dali-toolkit/public-api/visuals/visual-properties.h>
38 #if defined(DEBUG_ENABLED)
39 Debug::Filter* gVisualBaseLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_VISUAL_BASE");
42 const char* const PRE_MULTIPLIED_ALPHA_PROPERTY("preMultipliedAlpha");
54 DALI_ENUM_TO_STRING_TABLE_BEGIN(VISUAL_FITTING_MODE)
55 DALI_ENUM_TO_STRING_WITH_SCOPE(Visual::FittingMode, FIT_KEEP_ASPECT_RATIO)
56 DALI_ENUM_TO_STRING_WITH_SCOPE(Visual::FittingMode, FILL)
57 DALI_ENUM_TO_STRING_WITH_SCOPE(Visual::FittingMode, OVER_FIT_KEEP_ASPECT_RATIO)
58 DALI_ENUM_TO_STRING_WITH_SCOPE(Visual::FittingMode, CENTER)
59 DALI_ENUM_TO_STRING_WITH_SCOPE(Visual::FittingMode, FIT_WIDTH)
60 DALI_ENUM_TO_STRING_WITH_SCOPE(Visual::FittingMode, FIT_HEIGHT)
61 DALI_ENUM_TO_STRING_TABLE_END(VISUAL_FITTING_MODE)
65 Visual::Base::Base(VisualFactoryCache& factoryCache, FittingMode fittingMode, Toolkit::Visual::Type type)
66 : mImpl(new Impl(fittingMode, type)),
67 mFactoryCache(factoryCache)
76 void Visual::Base::Initialize()
78 // The Renderer should be created inside derived class here.
85 if(IsRoundedCornerRequired())
87 mImpl->mCornerRadiusIndex = mImpl->mRenderer.RegisterProperty(DevelVisual::Property::CORNER_RADIUS, CORNER_RADIUS, mImpl->mCornerRadius);
88 mImpl->mRenderer.RegisterProperty(CORNER_RADIUS_POLICY, mImpl->mCornerRadiusPolicy);
90 mImpl->mRenderer.SetProperty(Renderer::Property::BLEND_MODE, BlendMode::ON);
95 void Visual::Base::SetCustomShader(const Property::Map& shaderMap)
97 if(mImpl->mCustomShader)
99 mImpl->mCustomShader->SetPropertyMap(shaderMap);
103 mImpl->mCustomShader = new Impl::CustomShader(shaderMap);
106 // Let derived class know
110 void Visual::Base::SetProperties(const Property::Map& propertyMap)
112 for(size_t i = 0; i < propertyMap.Count(); ++i)
114 const KeyValuePair& pair = propertyMap.GetKeyValue(i);
115 const Property::Key& key = pair.first;
116 const Property::Value& value = pair.second;
118 Property::Key matchKey = key;
119 if(matchKey.type == Property::Key::STRING)
121 if(matchKey == CUSTOM_SHADER)
123 matchKey = Property::Key(Toolkit::Visual::Property::SHADER);
125 else if(matchKey == TRANSFORM)
127 matchKey = Property::Key(Toolkit::Visual::Property::TRANSFORM);
129 else if(matchKey == PREMULTIPLIED_ALPHA)
131 matchKey = Property::Key(Toolkit::Visual::Property::PREMULTIPLIED_ALPHA);
133 else if(matchKey == MIX_COLOR)
135 matchKey = Property::Key(Toolkit::Visual::Property::MIX_COLOR);
137 else if(matchKey == OPACITY)
139 matchKey = Property::Key(Toolkit::Visual::Property::OPACITY);
141 else if(matchKey == VISUAL_FITTING_MODE)
143 matchKey = Property::Key(Toolkit::DevelVisual::Property::VISUAL_FITTING_MODE);
145 else if(matchKey == CORNER_RADIUS)
147 matchKey = Property::Key(Toolkit::DevelVisual::Property::CORNER_RADIUS);
149 else if(matchKey == CORNER_RADIUS_POLICY)
151 matchKey = Property::Key(Toolkit::DevelVisual::Property::CORNER_RADIUS_POLICY);
155 switch(matchKey.indexKey)
157 case Toolkit::Visual::Property::SHADER:
159 Property::Map shaderMap;
160 if(value.Get(shaderMap))
162 SetCustomShader(shaderMap);
167 case Toolkit::Visual::Property::TRANSFORM:
172 mImpl->mTransform.SetPropertyMap(map);
177 case Toolkit::Visual::Property::PREMULTIPLIED_ALPHA:
179 bool premultipliedAlpha = false;
180 if(value.Get(premultipliedAlpha))
182 EnablePreMultipliedAlpha(premultipliedAlpha);
187 case Toolkit::Visual::Property::MIX_COLOR:
190 if(value.Get(mixColor))
192 if(value.GetType() == Property::VECTOR4)
194 SetMixColor(mixColor);
198 Vector3 mixColor3(mixColor);
199 SetMixColor(mixColor3);
204 case Toolkit::Visual::Property::OPACITY:
207 if(value.Get(opacity))
209 mImpl->mMixColor.a = opacity;
210 SetMixColor(mImpl->mMixColor);
214 case Toolkit::DevelVisual::Property::VISUAL_FITTING_MODE:
216 Scripting::GetEnumerationProperty<Visual::FittingMode>(
217 value, VISUAL_FITTING_MODE_TABLE, VISUAL_FITTING_MODE_TABLE_COUNT, mImpl->mFittingMode);
220 case Toolkit::DevelVisual::Property::CORNER_RADIUS:
223 if(value.Get(radius))
225 mImpl->mCornerRadius = radius;
229 case Toolkit::DevelVisual::Property::CORNER_RADIUS_POLICY:
232 if(value.Get(policy))
236 case Toolkit::Visual::Transform::Policy::RELATIVE:
237 case Toolkit::Visual::Transform::Policy::ABSOLUTE:
239 mImpl->mCornerRadiusPolicy = policy;
244 DALI_LOG_ERROR("Unsupported policy: %d\n", policy);
254 DoSetProperties(propertyMap);
257 void Visual::Base::SetTransformAndSize(const Property::Map& transform, Size controlSize)
259 mImpl->mControlSize = controlSize;
260 mImpl->mTransform.UpdatePropertyMap(transform);
262 #if defined(DEBUG_ENABLED)
263 std::ostringstream oss;
265 DALI_LOG_INFO(gVisualBaseLogFilter, Debug::General, "Visual::Base::SetTransformAndSize(%s) - [\e[1;32mtransform: %s controlSize: (%3.1f, %3.1f)]\e[0m\n", GetName().c_str(), oss.str().c_str(), controlSize.x, controlSize.y);
271 void Visual::Base::SetName(const std::string& name)
276 const std::string& Visual::Base::GetName() const
281 float Visual::Base::GetHeightForWidth(float width)
283 float aspectCorrectedHeight = 0.f;
285 GetNaturalSize(naturalSize);
286 if(naturalSize.width)
288 aspectCorrectedHeight = naturalSize.height * width / naturalSize.width;
290 return aspectCorrectedHeight;
293 float Visual::Base::GetWidthForHeight(float height)
295 float aspectCorrectedWidth = 0.f;
297 GetNaturalSize(naturalSize);
298 if(naturalSize.height > 0.0f)
300 aspectCorrectedWidth = naturalSize.width * height / naturalSize.height;
302 return aspectCorrectedWidth;
305 void Visual::Base::GetNaturalSize(Vector2& naturalSize)
307 naturalSize = Vector2::ZERO;
310 void Visual::Base::DoAction(const Property::Index actionId, const Property::Value attributes)
312 OnDoAction(actionId, attributes);
315 void Visual::Base::SetDepthIndex(int index)
317 mImpl->mDepthIndex = index;
320 mImpl->mRenderer.SetProperty(Renderer::Property::DEPTH_INDEX, mImpl->mDepthIndex);
324 int Visual::Base::GetDepthIndex() const
326 return mImpl->mDepthIndex;
329 void Visual::Base::SetOnScene(Actor& actor)
333 // To display the actor correctly, renderer should not be added to actor until all required resources are ready.
334 // Thus the calling of actor.AddRenderer() should happen inside derived class as base class does not know the exact timing.
339 mImpl->mRenderer.SetProperty(Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA, IsPreMultipliedAlphaEnabled());
340 mImpl->mRenderer.SetProperty(Renderer::Property::DEPTH_INDEX, mImpl->mDepthIndex);
343 mImpl->mFlags |= Impl::IS_ON_SCENE;
347 void Visual::Base::SetOffScene(Actor& actor)
351 DoSetOffScene(actor);
352 mImpl->mFlags &= ~Impl::IS_ON_SCENE;
356 void Visual::Base::CreatePropertyMap(Property::Map& map) const
360 // Update values from Renderer
361 mImpl->mMixColor = mImpl->mRenderer.GetProperty<Vector3>(mImpl->mMixColorIndex);
362 mImpl->mMixColor.a = mImpl->mRenderer.GetProperty<float>(DevelRenderer::Property::OPACITY);
363 if(mImpl->mTransform.mOffsetIndex != Property::INVALID_INDEX)
365 mImpl->mTransform.mOffset = mImpl->mRenderer.GetProperty<Vector2>(mImpl->mTransform.mOffsetIndex);
367 if(mImpl->mTransform.mSizeIndex != Property::INVALID_INDEX)
369 mImpl->mTransform.mSize = mImpl->mRenderer.GetProperty<Vector2>(mImpl->mTransform.mSizeIndex);
371 if(mImpl->mCornerRadiusIndex != Property::INVALID_INDEX)
373 mImpl->mCornerRadius = mImpl->mRenderer.GetProperty<float>(mImpl->mCornerRadiusIndex);
377 DoCreatePropertyMap(map);
379 if(mImpl->mCustomShader)
381 mImpl->mCustomShader->CreatePropertyMap(map);
384 Property::Map transform;
385 mImpl->mTransform.GetPropertyMap(transform);
386 map.Insert(Toolkit::Visual::Property::TRANSFORM, transform);
388 bool premultipliedAlpha(IsPreMultipliedAlphaEnabled());
389 map.Insert(Toolkit::Visual::Property::PREMULTIPLIED_ALPHA, premultipliedAlpha);
391 // Note, Color and Primitive will also insert their own mix color into the map
392 // which is ok, because they have a different key value range.
393 map.Insert(Toolkit::Visual::Property::MIX_COLOR, mImpl->mMixColor); // vec4
394 map.Insert(Toolkit::Visual::Property::OPACITY, mImpl->mMixColor.a);
396 auto fittingModeString = Scripting::GetLinearEnumerationName<FittingMode>(
397 mImpl->mFittingMode, VISUAL_FITTING_MODE_TABLE, VISUAL_FITTING_MODE_TABLE_COUNT);
398 map.Insert(Toolkit::DevelVisual::Property::VISUAL_FITTING_MODE, fittingModeString);
400 map.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS, mImpl->mCornerRadius);
401 map.Insert(Toolkit::DevelVisual::Property::CORNER_RADIUS_POLICY, static_cast<int>(mImpl->mCornerRadiusPolicy));
404 void Visual::Base::CreateInstancePropertyMap(Property::Map& map) const
406 DoCreateInstancePropertyMap(map);
408 if(mImpl->mCustomShader)
410 mImpl->mCustomShader->CreatePropertyMap(map);
414 void Visual::Base::EnablePreMultipliedAlpha(bool preMultiplied)
418 mImpl->mFlags |= Impl::IS_PREMULTIPLIED_ALPHA;
422 mImpl->mFlags &= ~Impl::IS_PREMULTIPLIED_ALPHA;
427 mImpl->mRenderer.SetProperty(Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA, preMultiplied);
428 mImpl->mRenderer.RegisterProperty(PRE_MULTIPLIED_ALPHA_PROPERTY, static_cast<float>(preMultiplied));
432 bool Visual::Base::IsPreMultipliedAlphaEnabled() const
434 return mImpl->mFlags & Impl::IS_PREMULTIPLIED_ALPHA;
437 void Visual::Base::DoSetOffScene(Actor& actor)
439 actor.RemoveRenderer(mImpl->mRenderer);
442 bool Visual::Base::IsOnScene() const
444 return mImpl->mFlags & Impl::IS_ON_SCENE;
447 bool Visual::Base::IsRoundedCornerRequired() const
449 if(mImpl->mRenderer && mImpl->mCornerRadiusIndex != Property::INVALID_INDEX)
451 // Update values from Renderer
452 mImpl->mCornerRadius = mImpl->mRenderer.GetProperty<float>(mImpl->mCornerRadiusIndex);
454 return !EqualsZero(mImpl->mCornerRadius) || mImpl->mNeedCornerRadius;
457 void Visual::Base::OnDoAction(const Property::Index actionId, const Property::Value& attributes)
459 // May be overriden by derived class
462 void Visual::Base::RegisterMixColor()
464 // Only register if not already registered.
465 // (Color and Primitive visuals will register their own and save to this index)
466 if(mImpl->mMixColorIndex == Property::INVALID_INDEX)
468 mImpl->mMixColorIndex = mImpl->mRenderer.RegisterProperty(
469 Toolkit::Visual::Property::MIX_COLOR,
471 Vector3(mImpl->mMixColor));
474 mImpl->mRenderer.SetProperty(DevelRenderer::Property::OPACITY, mImpl->mMixColor.a);
476 float preMultipliedAlpha = 0.0f;
477 if(IsPreMultipliedAlphaEnabled())
479 preMultipliedAlpha = 1.0f;
481 mImpl->mRenderer.RegisterProperty(PRE_MULTIPLIED_ALPHA_PROPERTY, preMultipliedAlpha);
484 void Visual::Base::SetMixColor(const Vector4& color)
486 mImpl->mMixColor = color;
490 mImpl->mRenderer.SetProperty(mImpl->mMixColorIndex, Vector3(color));
491 mImpl->mRenderer.SetProperty(DevelRenderer::Property::OPACITY, color.a);
495 void Visual::Base::SetMixColor(const Vector3& color)
497 mImpl->mMixColor.r = color.r;
498 mImpl->mMixColor.g = color.g;
499 mImpl->mMixColor.b = color.b;
503 mImpl->mRenderer.SetProperty(mImpl->mMixColorIndex, color);
507 void Visual::Base::AddEventObserver(Visual::EventObserver& observer)
509 mImpl->mEventObserver = &observer;
512 void Visual::Base::RemoveEventObserver(Visual::EventObserver& observer)
514 mImpl->mEventObserver = NULL;
517 void Visual::Base::ResourceReady(Toolkit::Visual::ResourceStatus resourceStatus)
519 if(mImpl->mResourceStatus != resourceStatus)
521 mImpl->mResourceStatus = resourceStatus;
523 if(mImpl->mEventObserver)
525 // observer is currently a control impl
526 mImpl->mEventObserver->ResourceReady(*this);
531 bool Visual::Base::IsResourceReady() const
533 return (mImpl->mResourceStatus == Toolkit::Visual::ResourceStatus::READY);
536 bool Visual::Base::IsSynchronousLoadingRequired() const
538 return (mImpl->mFlags & Impl::IS_SYNCHRONOUS_RESOURCE_LOADING);
541 Toolkit::Visual::Type Visual::Base::GetType() const
546 Toolkit::Visual::ResourceStatus Visual::Base::GetResourceStatus() const
548 return mImpl->mResourceStatus;
551 Visual::FittingMode Visual::Base::GetFittingMode() const
553 return mImpl->mFittingMode;
556 Visual::Base& Visual::Base::GetVisualObject()
561 Renderer Visual::Base::GetRenderer()
563 return mImpl->mRenderer;
566 Property::Index Visual::Base::GetPropertyIndex(Property::Key key)
568 Property::Index index = mImpl->mRenderer.GetPropertyIndex(key);
570 if(index == Property::INVALID_INDEX)
572 // Is it a shader property?
573 Shader shader = mImpl->mRenderer.GetShader();
574 index = shader.GetPropertyIndex(key);
575 if(index != Property::INVALID_INDEX)
577 // Yes - we should register it in the Renderer so it can be set / animated
578 // independently, as shaders are shared across multiple renderers.
580 Property::Index keyIndex(Property::INVALID_KEY);
581 if(key.type == Property::Key::INDEX)
583 keyName = shader.GetPropertyName(index);
584 keyIndex = key.indexKey;
588 keyName = key.stringKey;
589 // Leave keyIndex as INVALID_KEY - it can still be registered against the string key.
591 Property::Value value = shader.GetProperty(index);
592 index = mImpl->mRenderer.RegisterProperty(keyIndex, keyName, value);
598 void Visual::Base::SetupTransition(
599 Dali::Animation& transition,
600 Internal::TransitionData::Animator& animator,
601 Property::Index index,
602 Property::Value& initialValue,
603 Property::Value& targetValue)
605 if(index != Property::INVALID_INDEX)
609 if(animator.animate == false)
611 mImpl->mRenderer.SetProperty(index, targetValue);
615 if(animator.initialValue.GetType() != Property::NONE)
617 mImpl->mRenderer.SetProperty(index, initialValue);
622 transition = Dali::Animation::New(0.1f);
625 transition.AnimateTo(Property(mImpl->mRenderer, index),
627 animator.alphaFunction,
628 TimePeriod(animator.timePeriodDelay,
629 animator.timePeriodDuration));
635 void Visual::Base::AnimateProperty(
636 Dali::Animation& transition,
637 Internal::TransitionData::Animator& animator)
639 #if defined(DEBUG_ENABLED)
641 std::ostringstream oss;
642 oss << "Visual::Base::AnimateProperty(Visual:" << mImpl->mName << " Property:" << animator.propertyKey << " Target: " << animator.targetValue << std::endl;
643 DALI_LOG_INFO(gVisualBaseLogFilter, Debug::General, oss.str().c_str());
647 if(animator.propertyKey == Toolkit::Visual::Property::MIX_COLOR ||
648 animator.propertyKey == MIX_COLOR ||
649 (mImpl->mType == Toolkit::Visual::COLOR &&
650 animator.propertyKey == ColorVisual::Property::MIX_COLOR) ||
651 (mImpl->mType == Toolkit::Visual::PRIMITIVE &&
652 animator.propertyKey == PrimitiveVisual::Property::MIX_COLOR))
654 AnimateMixColorProperty(transition, animator);
656 else if(animator.propertyKey == Toolkit::Visual::Property::OPACITY ||
657 animator.propertyKey == OPACITY)
659 AnimateOpacityProperty(transition, animator);
661 else if(mImpl->mRenderer)
663 AnimateRendererProperty(transition, animator);
667 void Visual::Base::AnimateOpacityProperty(
668 Dali::Animation& transition,
669 Internal::TransitionData::Animator& animator)
672 if(animator.targetValue.Get(targetOpacity))
674 mImpl->mMixColor.a = targetOpacity;
677 SetupTransition(transition, animator, DevelRenderer::Property::OPACITY, animator.initialValue, animator.targetValue);
680 void Visual::Base::AnimateRendererProperty(
681 Dali::Animation& transition,
682 Internal::TransitionData::Animator& animator)
684 Property::Index index = GetPropertyIndex(animator.propertyKey);
685 if(index != Property::INVALID_INDEX)
687 if(animator.targetValue.GetType() != Property::NONE)
689 // Try writing target value into transform property map
690 // if it's not a valid key, then it won't alter mTransform
692 if(animator.propertyKey.type == Property::Key::INDEX)
694 map.Add(animator.propertyKey.indexKey, animator.targetValue);
698 map.Add(animator.propertyKey.stringKey, animator.targetValue);
701 mImpl->mTransform.UpdatePropertyMap(map);
704 SetupTransition(transition, animator, index, animator.initialValue, animator.targetValue);
708 void Visual::Base::AnimateMixColorProperty(
709 Dali::Animation& transition,
710 Internal::TransitionData::Animator& animator)
712 Property::Index index = mImpl->mMixColorIndex;
713 bool animateOpacity = false;
715 Property::Value initialOpacity;
716 Property::Value targetOpacity;
717 Property::Value initialMixColor;
718 Property::Value targetMixColor;
720 if(index != Property::INVALID_INDEX)
722 Vector4 initialColor;
723 if(animator.initialValue.Get(initialColor))
725 if(animator.initialValue.GetType() == Property::VECTOR4)
727 // if there is an initial color specifying alpha, test it
728 initialOpacity = initialColor.a;
730 initialMixColor = Vector3(initialColor);
733 // Set target value into data store
734 if(animator.targetValue.GetType() != Property::NONE)
737 animator.targetValue.Get(mixColor);
738 if(animator.targetValue.GetType() == Property::VECTOR4)
740 mImpl->mMixColor.a = mixColor.a;
741 targetOpacity = mixColor.a;
742 animateOpacity = true;
745 mImpl->mMixColor.r = mixColor.r;
746 mImpl->mMixColor.g = mixColor.g;
747 mImpl->mMixColor.b = mixColor.b;
748 targetMixColor = Vector3(mixColor);
751 SetupTransition(transition, animator, index, initialMixColor, targetMixColor);
754 SetupTransition(transition, animator, DevelRenderer::Property::OPACITY, initialOpacity, targetOpacity);
759 Dali::Property Visual::Base::GetPropertyObject(Dali::Property::Key key)
761 if(!mImpl->mRenderer)
764 return Dali::Property(handle, Property::INVALID_INDEX);
767 // Mix color or opacity cases
768 if(key.type == Property::Key::INDEX)
770 if(key.indexKey == Toolkit::Visual::Property::MIX_COLOR || (mImpl->mType == Toolkit::Visual::COLOR && key.indexKey == ColorVisual::Property::MIX_COLOR) || (mImpl->mType == Toolkit::Visual::PRIMITIVE && key.indexKey == PrimitiveVisual::Property::MIX_COLOR))
772 return Dali::Property(mImpl->mRenderer, mImpl->mMixColorIndex);
774 else if(key.indexKey == Toolkit::Visual::Property::OPACITY)
776 return Dali::Property(mImpl->mRenderer, DevelRenderer::Property::OPACITY);
778 else if(key.indexKey == Toolkit::Visual::Transform::Property::OFFSET)
780 return Dali::Property(mImpl->mRenderer, OFFSET);
782 else if(key.indexKey == Toolkit::Visual::Transform::Property::SIZE)
784 return Dali::Property(mImpl->mRenderer, SIZE);
789 if(key.stringKey == MIX_COLOR)
791 return Dali::Property(mImpl->mRenderer, mImpl->mMixColorIndex);
793 else if(key.stringKey == OPACITY)
795 return Dali::Property(mImpl->mRenderer, DevelRenderer::Property::OPACITY);
797 else if(key.stringKey == OFFSET)
799 return Dali::Property(mImpl->mRenderer, OFFSET);
801 else if(key.stringKey == SIZE)
803 return Dali::Property(mImpl->mRenderer, SIZE);
808 Property::Index index = GetPropertyIndex(key);
809 if(index == Property::INVALID_INDEX)
811 if((key.type == Property::Key::INDEX && key.indexKey == DevelVisual::Property::CORNER_RADIUS) || (key.type == Property::Key::STRING && key.stringKey == CORNER_RADIUS))
813 // Register CORNER_RADIUS property
814 mImpl->mCornerRadiusIndex = mImpl->mRenderer.RegisterProperty(DevelVisual::Property::CORNER_RADIUS, CORNER_RADIUS, mImpl->mCornerRadius);
815 mImpl->mRenderer.RegisterProperty(CORNER_RADIUS_POLICY, mImpl->mCornerRadiusPolicy);
817 mImpl->mRenderer.SetProperty(Renderer::Property::BLEND_MODE, BlendMode::ON);
819 index = mImpl->mCornerRadiusIndex;
820 mImpl->mNeedCornerRadius = true;
827 // We can't find the property in the base class.
828 // Request to child class
829 return OnGetPropertyObject(key);
833 return Dali::Property(mImpl->mRenderer, index);
836 } // namespace Internal
838 } // namespace Toolkit