/*
- * Copyright(c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2021 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.
/// The copy constructor.
/// </summary>
/// <param name="other">The copy target.</param>
+ /// <exception cref="ArgumentNullException"> Thrown when other is null. </exception>
[EditorBrowsable(EditorBrowsableState.Never)]
- public Vector2(Vector2 other) : this((float)other?.X, (float)other.Y)
+ public Vector2(Vector2 other) : this(other == null ? throw new ArgumentNullException(nameof(other)) : other.X, other.Y)
{
}
/// The x component.
/// </summary>
/// <remarks>
- /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector2(...) constructor.
+ /// The setter is deprecated in API8 and will be removed in API10. Use new Vector2(...) constructor.
/// </remarks>
/// <code>
/// // DO NOT use like the followings!
/// Vector2 vector2 = new Vector2();
/// vector2.X = 0.1f;
- /// // Please USE like this
+ /// // USE like this
/// float x = 0.1f, y = 0.5f;
/// Vector2 vector2 = new Vector2(x, y);
/// </code>
/// <since_tizen> 3 </since_tizen>
public float X
{
+ [Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use new Vector2(...) constructor")]
set
{
- Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector2(...) constructor");
-
Interop.Vector2.XSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
/// The width.
/// </summary>
/// <remarks>
- /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector2(...) constructor.
+ /// The setter is deprecated in API8 and will be removed in API10. Use new Vector2(...) constructor.
/// </remarks>
/// <code>
/// // DO NOT use like the followings!
/// Vector2 vector2 = new Vector2();
/// vector2.Width = 1.0f;
- /// // Please USE like this
+ /// // USE like this
/// float width = 1.0f, height = 2.0f;
/// Vector2 vector2 = new Vector2(x, y);
/// </code>
/// <since_tizen> 3 </since_tizen>
public float Width
{
+ [Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use new Vector2(...) constructor")]
set
{
- Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector2(...) constructor");
-
Interop.Vector2.WidthSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
/// The y component.
/// </summary>
/// <remarks>
- /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector2(...) constructor.
+ /// The setter is deprecated in API8 and will be removed in API10. Use new Vector2(...) constructor.
/// </remarks>
/// <code>
/// // DO NOT use like the followings!
/// Vector2 vector2 = new Vector2();
/// vector2.Y = 0.5f;
- /// // Please USE like this
+ /// // USE like this
/// float x = 0.1f, y = 0.5f;
/// Vector2 vector2 = new Vector2(x, y);
/// </code>
/// <since_tizen> 3 </since_tizen>
public float Y
{
+ [Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use new Vector2(...) constructor")]
set
{
- Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector2(...) constructor");
-
Interop.Vector2.YSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
/// The height.
/// </summary>
/// <remarks>
- /// The setter is deprecated in API8 and will be removed in API10. Please use new Vector2(...) constructor.
+ /// The setter is deprecated in API8 and will be removed in API10. Use new Vector2(...) constructor.
/// </remarks>
/// <code>
/// // DO NOT use like the followings!
/// Vector2 vector2 = new Vector2();
/// vector2.Height = 2.0f;
- /// // Please USE like this
+ /// // USE like this
/// float width = 1.0f, height = 2.0f;
/// Vector2 vector2 = new Vector2(x, y);
/// </code>
/// <since_tizen> 3 </since_tizen>
public float Height
{
+ [Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use new Vector2(...) constructor")]
set
{
- Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new Vector2(...) constructor");
-
Interop.Vector2.HeightSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <summary>
- /// Gets the the hash code of this Vector2.
+ /// Gets the hash code of this Vector2.
/// </summary>
/// <returns>The Hash Code.</returns>
/// <since_tizen> 6 </since_tizen>
return ret;
}
- internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Vector2 obj)
- {
- return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
- }
-
internal SWIGTYPE_p_float AsFloat()
{
global::System.IntPtr cPtr = Interop.Vector2.AsFloat(SwigCPtr);