}
case Toolkit::DevelVisual::Property::CORNER_RADIUS:
{
- float radius;
- if(value.Get(radius))
+ if(value.GetType() == Property::VECTOR4)
{
- mImpl->mCornerRadius = radius;
+ // If CORNER_RADIUS Property is Vector4,
+ // Each values mean the radius of
+ // (top-left, top-right, bottom-right, bottom-left)
+ Vector4 radius;
+ if(value.Get(radius))
+ {
+ mImpl->mCornerRadius = radius;
+ }
+ }
+ else
+ {
+ // If CORNER_RADIUS Property is float,
+ // Every corner radius have same value
+ float radius;
+ if(value.Get(radius))
+ {
+ mImpl->mCornerRadius = Vector4(radius, radius, radius, radius);
+ }
}
break;
}
}
if(mImpl->mCornerRadiusIndex != Property::INVALID_INDEX)
{
- mImpl->mCornerRadius = mImpl->mRenderer.GetProperty<float>(mImpl->mCornerRadiusIndex);
+ mImpl->mCornerRadius = mImpl->mRenderer.GetProperty<Vector4>(mImpl->mCornerRadiusIndex);
}
}
if(mImpl->mRenderer && mImpl->mCornerRadiusIndex != Property::INVALID_INDEX)
{
// Update values from Renderer
- mImpl->mCornerRadius = mImpl->mRenderer.GetProperty<float>(mImpl->mCornerRadiusIndex);
+ mImpl->mCornerRadius = mImpl->mRenderer.GetProperty<Vector4>(mImpl->mCornerRadiusIndex);
}
- return !EqualsZero(mImpl->mCornerRadius) || mImpl->mNeedCornerRadius;
+ return !(mImpl->mCornerRadius == Vector4::ZERO) || mImpl->mNeedCornerRadius;
}
void Visual::Base::OnDoAction(const Property::Index actionId, const Property::Value& attributes)