/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
if(!mBlurEnabled)
{
- animation.AnimateTo(DevelControl::GetVisualProperty(mImageView, ImageView::Property::IMAGE, Visual::Property::MIX_COLOR), Vector3(1.0f, 0.0f, 0.0f));
- animation.AnimateTo(DevelControl::GetVisualProperty(mImageView, ImageView::Property::IMAGE, Visual::Property::OPACITY), 0.5f);
+ animation.AnimateTo(DevelControl::GetVisualProperty(mImageView, ImageView::Property::IMAGE, Visual::Property::MIX_COLOR), Vector4(1.0f, 0.0f, 0.0f, 0.5f));
animation.AnimateTo(DevelControl::GetVisualProperty(mImageView, ImageView::Property::IMAGE, DevelVisual::Property::CORNER_RADIUS), CORNER_RADIUS_VALUE);
- animation.AnimateTo(DevelControl::GetVisualProperty(mImageView, DevelControl::Property::SHADOW, ColorVisual::Property::MIX_COLOR), Vector3(0.0f, 0.0f, 1.0f));
+ animation.AnimateTo(DevelControl::GetVisualProperty(mImageView, DevelControl::Property::SHADOW, ColorVisual::Property::MIX_COLOR), Vector4(0.0f, 0.0f, 1.0f, 0.5f));
animation.AnimateTo(DevelControl::GetVisualProperty(mImageView, DevelControl::Property::SHADOW, DevelVisual::Property::CORNER_RADIUS), SHADOW_CORNER_RADIUS_VALUE);
animation.AnimateTo(DevelControl::GetVisualProperty(mImageView, DevelControl::Property::SHADOW, DevelColorVisual::Property::BLUR_RADIUS), BLUR_RADIUS_VALUE);
animation.AnimateTo(DevelControl::GetVisualProperty(mImageView, DevelControl::Property::SHADOW, Visual::Transform::Property::OFFSET), BLUR_OFFSET_VALUE);
}
else
{
- animation.AnimateTo(DevelControl::GetVisualProperty(mImageView, ImageView::Property::IMAGE, Visual::Property::MIX_COLOR), Vector3(1.0f, 1.0f, 1.0f));
- animation.AnimateTo(DevelControl::GetVisualProperty(mImageView, ImageView::Property::IMAGE, Visual::Property::OPACITY), 1.0f);
+ animation.AnimateTo(DevelControl::GetVisualProperty(mImageView, ImageView::Property::IMAGE, Visual::Property::MIX_COLOR), Vector4(1.0f, 1.0f, 1.0f, 1.0f));
animation.AnimateTo(DevelControl::GetVisualProperty(mImageView, ImageView::Property::IMAGE, DevelVisual::Property::CORNER_RADIUS), Vector4::ZERO);
- animation.AnimateTo(DevelControl::GetVisualProperty(mImageView, DevelControl::Property::SHADOW, ColorVisual::Property::MIX_COLOR), Vector3(0.0f, 0.0f, 0.0f));
+ animation.AnimateTo(DevelControl::GetVisualProperty(mImageView, DevelControl::Property::SHADOW, ColorVisual::Property::MIX_COLOR), Vector4(0.0f, 0.0f, 0.0f, 0.5f));
animation.AnimateTo(DevelControl::GetVisualProperty(mImageView, DevelControl::Property::SHADOW, DevelVisual::Property::CORNER_RADIUS), Vector4::ZERO);
animation.AnimateTo(DevelControl::GetVisualProperty(mImageView, DevelControl::Property::SHADOW, DevelColorVisual::Property::BLUR_RADIUS), 0.0f);
animation.AnimateTo(DevelControl::GetVisualProperty(mImageView, DevelControl::Property::SHADOW, Visual::Transform::Property::OFFSET), Vector2::ZERO);
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
{
}
- void operator()(Vector3& current, const PropertyInputContainer& inputs)
+ void operator()(Vector4& current, const PropertyInputContainer& inputs)
{
- current = hsv2rgb(Vector3(inputs[0]->GetFloat(), saturation, value));
+ auto rgbColor = hsv2rgb(Vector3(inputs[0]->GetFloat(), saturation, value));
+ current.r = rgbColor.r;
+ current.g = rgbColor.g;
+ current.b = rgbColor.b;
}
Vector3 hsv2rgb(Vector3 colorHSV)
mContainer = Control::New();
mContainer.SetProperty(Dali::Actor::Property::NAME, "Container");
mContainer.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER);
- auto size = std::min(mWindowSize.width, mWindowSize.height) * 0.6f;
+ auto size = std::min(mWindowSize.width, mWindowSize.height) * 0.6f;
mLayoutSize = Vector2(size, size);
mContainer.SetProperty(Actor::Property::SIZE, mLayoutSize);
window.Add(mContainer);
mHueAngleIndex = mLabel.RegisterProperty("hue", 0.0f);
Renderer bgRenderer = mLabel.GetRendererAt(0);
- Constraint constraint = Constraint::New<Vector3>(bgRenderer, VisualRenderer::Property::VISUAL_MIX_COLOR, HSVColorConstraint(0.0f, 0.5f, 0.8f));
+ Constraint constraint = Constraint::New<Vector4>(bgRenderer, Renderer::Property::MIX_COLOR, HSVColorConstraint(0.0f, 0.5f, 0.8f));
constraint.AddSource(Source(mLabel, mHueAngleIndex));
constraint.SetRemoveAction(Constraint::DISCARD);
constraint.Apply();