2 * Copyright(c) 2020 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using System.ComponentModel;
23 /// The class storing Background extra properties such as CornerRadius, ImageBorder.
25 internal class BackgroundExtraData : IDisposable
27 private bool disposed = false;
28 internal BackgroundExtraData()
32 internal BackgroundExtraData(BackgroundExtraData other)
34 BackgroundImageBorder = other.BackgroundImageBorder;
35 CornerRadius = other.CornerRadius;
38 private Rectangle backgroundImageBorder;
40 /// <summary></summary>
41 internal Rectangle BackgroundImageBorder
43 get => backgroundImageBorder;
44 set => backgroundImageBorder = new Rectangle(value);
47 /// <summary></summary>
48 internal Vector4 CornerRadius { get; set; }
51 /// Whether the CornerRadius value is relative (percentage [0.0f to 1.0f] of the view size) or absolute (in world units).
53 internal VisualTransformPolicyType CornerRadiusPolicy { get; set; } = VisualTransformPolicyType.Absolute;
55 [EditorBrowsable(EditorBrowsableState.Never)]
56 protected virtual void Dispose(bool disposing)
64 backgroundImageBorder?.Dispose();
69 [EditorBrowsable(EditorBrowsableState.Never)]
73 global::System.GC.SuppressFinalize(this);