From 0b18460cf829c6184e350223aeb431102ad60635 Mon Sep 17 00:00:00 2001 From: ANZ1217 Date: Mon, 23 Sep 2024 16:47:45 +0900 Subject: [PATCH] [NUI] Add Outline Offset and BlurRadius at struct Outline --- .../src/public/BaseComponents/TextConstants.cs | 16 +++++++++++++++- .../src/public/BaseComponents/TextMapHelper.cs | 8 ++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextConstants.cs b/src/Tizen.NUI/src/public/BaseComponents/TextConstants.cs index 85b0b0d0c3d..bcd69f4e9a9 100644 --- a/src/Tizen.NUI/src/public/BaseComponents/TextConstants.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextConstants.cs @@ -416,6 +416,20 @@ public struct Outline : IEquatable [EditorBrowsable(EditorBrowsableState.Never)] public float? Width { get; set; } + /// + /// The offset in pixels of the offset (if null, the default value is 0, 0).
+ /// If not provided then the offset is not enabled.
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)] + public Vector2? Offset { get; set; } + + /// + /// The radius of blurring effect applied to the outline of the text. A higher value results in a more blurred outline.
+ /// If not specified, the default value is 0 which means no blurring effect will be applied.
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)] + public float? BlurRadius { get; set; } + /// /// Determines whether the specified object is equal to the current object. /// @@ -430,7 +444,7 @@ public struct Outline : IEquatable /// The Outline to compare with the current Outline. /// true if equal Outline, else false. [EditorBrowsable(EditorBrowsableState.Never)] - public bool Equals(Outline other) => Color == other.Color && Width == other.Width; + public bool Equals(Outline other) => Color == other.Color && Width == other.Width && Offset == other.Offset && BlurRadius == other.BlurRadius; /// /// The == operator. diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextMapHelper.cs b/src/Tizen.NUI/src/public/BaseComponents/TextMapHelper.cs index cf0454940f1..7683ab462d4 100644 --- a/src/Tizen.NUI/src/public/BaseComponents/TextMapHelper.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextMapHelper.cs @@ -384,6 +384,12 @@ public static PropertyMap GetOutlineMap(Outline outline) if (outline.Width != null) map.Add("width", (float)outline.Width); + if (outline.Offset != null) + map.Add("offset", outline.Offset); + + if (outline.BlurRadius != null) + map.Add("blurRadius", (float)outline.BlurRadius); + return map; } @@ -401,6 +407,8 @@ public static Outline GetOutlineStruct(PropertyMap map) { outline.Color = GetColorFromMap(map, "color"); outline.Width = GetFloatFromMap(map, "width", 0.0f); + outline.Offset = GetVector2FromMap(map, "offset"); + outline.BlurRadius = GetFloatFromMap(map, "blurRadius", 0.0f); } return outline;