+void Visual::Base::DoSetOffScene(Actor& actor)
+{
+ actor.RemoveRenderer(mImpl->mRenderer);
+}
+
+bool Visual::Base::IsOnScene() const
+{
+ return mImpl->mFlags & Impl::IS_ON_SCENE;
+}
+
+bool Visual::Base::IsRoundedCornerRequired() const
+{
+ if(mImpl->mRenderer && mImpl->mCornerRadiusIndex != Property::INVALID_INDEX)
+ {
+ // Update values from Renderer
+ mImpl->mCornerRadius = mImpl->mRenderer.GetProperty<Vector4>(mImpl->mCornerRadiusIndex);
+ }
+ return !(mImpl->mCornerRadius == Vector4::ZERO) || mImpl->mNeedCornerRadius;
+}
+
+void Visual::Base::OnDoAction(const Property::Index actionId, const Property::Value& attributes)
+{
+ // May be overriden by derived class
+}
+
+void Visual::Base::RegisterMixColor()
+{
+ // Only register if not already registered.
+ // (Color and Primitive visuals will register their own and save to this index)
+ if(mImpl->mMixColorIndex == Property::INVALID_INDEX)
+ {
+ mImpl->mMixColorIndex = mImpl->mRenderer.RegisterProperty(
+ Toolkit::Visual::Property::MIX_COLOR,
+ MIX_COLOR,
+ Vector3(mImpl->mMixColor));
+ }
+
+ mImpl->mRenderer.SetProperty(DevelRenderer::Property::OPACITY, mImpl->mMixColor.a);
+
+ float preMultipliedAlpha = 0.0f;
+ if(IsPreMultipliedAlphaEnabled())
+ {
+ preMultipliedAlpha = 1.0f;
+ }
+ mImpl->mRenderer.RegisterProperty(PRE_MULTIPLIED_ALPHA_PROPERTY, preMultipliedAlpha);
+}
+
+void Visual::Base::SetMixColor(const Vector4& color)
+{
+ mImpl->mMixColor = color;
+
+ if(mImpl->mRenderer)
+ {
+ mImpl->mRenderer.SetProperty(mImpl->mMixColorIndex, Vector3(color));
+ mImpl->mRenderer.SetProperty(DevelRenderer::Property::OPACITY, color.a);
+ }
+}
+
+void Visual::Base::SetMixColor(const Vector3& color)
+{
+ mImpl->mMixColor.r = color.r;
+ mImpl->mMixColor.g = color.g;
+ mImpl->mMixColor.b = color.b;
+
+ if(mImpl->mRenderer)
+ {
+ mImpl->mRenderer.SetProperty(mImpl->mMixColorIndex, color);
+ }
+}
+
+void Visual::Base::AddEventObserver(Visual::EventObserver& observer)
+{
+ mImpl->mEventObserver = &observer;
+}
+
+void Visual::Base::RemoveEventObserver(Visual::EventObserver& observer)
+{
+ mImpl->mEventObserver = NULL;
+}
+
+void Visual::Base::ResourceReady(Toolkit::Visual::ResourceStatus resourceStatus)
+{
+ if(mImpl->mResourceStatus != resourceStatus)
+ {
+ mImpl->mResourceStatus = resourceStatus;
+
+ if(mImpl->mEventObserver)
+ {
+ // observer is currently a control impl
+ mImpl->mEventObserver->ResourceReady(*this);
+ }
+ }
+}
+
+bool Visual::Base::IsResourceReady() const
+{
+ return (mImpl->mResourceStatus == Toolkit::Visual::ResourceStatus::READY);
+}
+
+bool Visual::Base::IsSynchronousLoadingRequired() const
+{
+ return (mImpl->mFlags & Impl::IS_SYNCHRONOUS_RESOURCE_LOADING);
+}
+
+Toolkit::Visual::Type Visual::Base::GetType() const
+{
+ return mImpl->mType;
+}
+
+Toolkit::Visual::ResourceStatus Visual::Base::GetResourceStatus() const
+{
+ return mImpl->mResourceStatus;
+}
+
+Visual::FittingMode Visual::Base::GetFittingMode() const