Struct UIShadow
Definition
- Assembly:
- Tizen.NUI.dll
Defines a value type of shadow.
public struct UIShadow : IEquatable<UIShadow>
- Implements
-
IEquatable<><UIShadow>
Constructors
View SourceUIShadow(float, UIColor, float, float, float, float, bool)
Create a Shadow.
Declaration
public UIShadow(float blurRadius, UIColor color, float offsetX = null, float offsetY = null, float extraWidth = null, float extraHeight = null, bool cutoutInner = false)
Parameters
| Type | Name | Description |
|---|---|---|
| float | blurRadius | The blur radius value for the shadow. Bigger value, much blurry. |
| UIColor | color | The color for the shadow. |
| float | offsetX | Optional. The x offset value from the top left corner. The default is 0. |
| float | offsetY | Optional. The y offset value from the top left corner. The default is 0. |
| float | extraWidth | Optional. The shadow will extend its size by specified amount of length. The default is 0. |
| float | extraHeight | Optional. The shadow will extend its size by specified amount of length. The default is 0. |
| bool | cutoutInner | Optional. Whether the shadow should be cutout with inner space of the target view. The default is false. |
UIShadow(float, UIColor, float, float, float, float, ColorVisualCutoutPolicyType)
Create a Shadow.
Declaration
public UIShadow(float blurRadius, UIColor color, float offsetX, float offsetY, float extraWidth, float extraHeight, ColorVisualCutoutPolicyType cutoutPolicy)
Parameters
| Type | Name | Description |
|---|---|---|
| float | blurRadius | The blur radius value for the shadow. Bigger value, much blurry. |
| UIColor | color | The color for the shadow. |
| float | offsetX | The x offset value from the top left corner. The default is 0. |
| float | offsetY | The y offset value from the top left corner. The default is 0. |
| float | extraWidth | The shadow will extend its size by specified amount of length. The default is 0. |
| float | extraHeight | The shadow will extend its size by specified amount of length. The default is 0. |
| ColorVisualCutoutPolicyType | cutoutPolicy | The policy of the shadow cutout. The default is None. |
Properties
View SourceBlurRadius
The blur radius value for the shadow. Bigger value, much blurry.
Declaration
public float BlurRadius { readonly get; init; }
Property Value
| Type | Description |
|---|---|
| float |
Remarks
Negative value is ignored. (no blur)
Color
The color for the shadow.
Declaration
public UIColor Color { readonly get; init; }
Property Value
| Type | Description |
|---|---|
| UIColor |
CutoutPolicy
The Cutout policy for this shadow.
Declaration
public ColorVisualCutoutPolicyType CutoutPolicy { readonly get; init; }
Property Value
| Type | Description |
|---|---|
| ColorVisualCutoutPolicyType |
Remarks
ColorVisualCutoutPolicyType.None = Fully render the shadow color (Default)
ColorVisualCutoutPolicyType.CutoutView = Do not render inside bounding box of view
ColorVisualCutoutPolicyType.CutoutViewWithCornerRadius = Do not render inside view, consider corner radius value
ExtraHeight
The shadow will extend its size by specified amount of length.
If the value is negative then the shadow will shrink.
For example, when View's size is (100, 100) and the Shadow's extra size are 5 and -5 respectively,
the output shadow will have size (105, 95).
Declaration
public float ExtraHeight { readonly get; init; }
Property Value
| Type | Description |
|---|---|
| float |
ExtraWidth
The shadow will extend its size by specified amount of length.
If the value is negative then the shadow will shrink.
For example, when View's size is (100, 100) and the Shadow's extra size are 5 and -5 respectively,
the output shadow will have size (105, 95).
Declaration
public float ExtraWidth { readonly get; init; }
Property Value
| Type | Description |
|---|---|
| float |
IsNone
Whether this shadow is none.
Declaration
public bool IsNone { get; }
Property Value
| Type | Description |
|---|---|
| bool |
None
The none shadow.
Declaration
public static UIShadow None { get; }
Property Value
| Type | Description |
|---|---|
| UIShadow |
OffsetX
The position offset value (x, y) from the top left corner.
Declaration
public float OffsetX { readonly get; init; }
Property Value
| Type | Description |
|---|---|
| float |
OffsetY
The position offset value (x, y) from the top left corner.
Declaration
public float OffsetY { readonly get; init; }
Property Value
| Type | Description |
|---|---|
| float |
Methods
View SourceEquals(object)
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Equals(UIShadow)
Whether this is equivalent to other.
Declaration
public bool Equals(UIShadow other)
Parameters
| Type | Name | Description |
|---|---|---|
| UIShadow | other |
Returns
| Type | Description |
|---|---|
| bool |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
Operators
View Sourceoperator ==(UIShadow, UIShadow)
Compares two UIShadow for equality.
Declaration
public static bool operator ==(UIShadow operand1, UIShadow operand2)
Parameters
| Type | Name | Description |
|---|---|---|
| UIShadow | operand1 | The first operand object. |
| UIShadow | operand2 | The second operand object. |
Returns
| Type | Description |
|---|---|
| bool | True if both are equal, otherwise false. |
operator !=(UIShadow, UIShadow)
Compares two UIShadow for inequality.
Declaration
public static bool operator !=(UIShadow operand1, UIShadow operand2)
Parameters
| Type | Name | Description |
|---|---|---|
| UIShadow | operand1 | The first operand object. |
| UIShadow | operand2 | The second operand object. |
Returns
| Type | Description |
|---|---|
| bool | True if both are not equal, otherwise false. |