[NUI] Apply BorderlineWidth to ImageView and ImageView.Background
authorEunki, Hong <eunkiki.hong@samsung.com>
Mon, 2 Aug 2021 09:15:46 +0000 (18:15 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Tue, 3 Aug 2021 01:50:50 +0000 (10:50 +0900)
Add missing implements about borderline

src/Tizen.NUI/src/public/BaseComponents/ImageView.cs

index 299ec02..0d52a8f 100755 (executable)
@@ -1121,7 +1121,9 @@ namespace Tizen.NUI.BaseComponents
 
         internal override void ApplyBorderline()
         {
-            // Ignore BACKGROUND borderline property. only apply borderline to IMAGE.
+            base.ApplyBorderline();
+
+            // Apply borderline to IMAGE.
             if (backgroundExtraData != null)
             {
                 var borderlineColor = backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor);
@@ -1142,6 +1144,7 @@ namespace Tizen.NUI.BaseComponents
                 imageValue.Dispose();
                 borderlineColor.Dispose();
             }
+
             UpdateImage(0, null);
         }
 
@@ -1294,6 +1297,18 @@ namespace Tizen.NUI.BaseComponents
                 }
             }
 
+            if (backgroundExtraData != null && backgroundExtraData.BorderlineWidth > 0.0f)
+            {
+                using (var borderlineWidth = new PropertyValue(backgroundExtraData.BorderlineWidth))
+                using (var borderlineColor = new PropertyValue(backgroundExtraData.BorderlineColor))
+                using (var borderlineOffset = new PropertyValue(backgroundExtraData.BorderlineOffset))
+                {
+                    imageMap.Insert(Visual.Property.BorderlineWidth, borderlineWidth);
+                    imageMap.Insert(Visual.Property.BorderlineColor, borderlineColor);
+                    imageMap.Insert(Visual.Property.BorderlineOffset, borderlineOffset);
+                }
+            }
+
             if (value != null)
             {
                 imageMap?.Insert(key, value);