a58fb03a60f3c1d51fb24bb4dcb7c5bb90246a21
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Vector2.cs
1 /*
2  * Copyright(c) 2018 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17 using System;
18 using Tizen.NUI.Binding;
19
20 namespace Tizen.NUI
21 {
22
23     /// <summary>
24     /// A two-dimensional vector.
25     /// </summary>
26     /// <since_tizen> 3 </since_tizen>
27     [TypeConverter(typeof(Vector2TypeConverter))]
28     public class Vector2 : global::System.IDisposable
29     {
30         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
31         /// <summary>
32         /// swigCMemOwn.
33         /// </summary>
34         /// <since_tizen> 3 </since_tizen>
35         protected bool swigCMemOwn;
36
37         internal Vector2(global::System.IntPtr cPtr, bool cMemoryOwn)
38         {
39             swigCMemOwn = cMemoryOwn;
40             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
41         }
42
43         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Vector2 obj)
44         {
45             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
46         }
47
48         //A Flag to check who called Dispose(). (By User or DisposeQueue)
49         private bool isDisposeQueued = false;
50
51         /// <summary>
52         /// A Flat to check if it is already disposed.
53         /// </summary>
54         /// <since_tizen> 3 </since_tizen>
55         protected bool disposed = false;
56
57         /// <summary>
58         /// Destructor.
59         /// </summary>
60         /// <since_tizen> 3 </since_tizen>
61         ~Vector2()
62         {
63             if(!isDisposeQueued)
64             {
65                 isDisposeQueued = true;
66                 DisposeQueue.Instance.Add(this);
67             }
68         }
69
70         /// <summary>
71         /// Dispose.
72         /// </summary>
73         /// <since_tizen> 3 </since_tizen>
74         public void Dispose()
75         {
76             //Throw excpetion if Dispose() is called in separate thread.
77             if (!Window.IsInstalled())
78             {
79                 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
80             }
81
82             if (isDisposeQueued)
83             {
84                 Dispose(DisposeTypes.Implicit);
85             }
86             else
87             {
88                 Dispose(DisposeTypes.Explicit);
89                 System.GC.SuppressFinalize(this);
90             }
91         }
92
93         /// <summary>
94         /// Dispose.
95         /// </summary>
96         /// <param name="type">The dispose type</param>
97         /// <since_tizen> 3 </since_tizen>
98         protected virtual void Dispose(DisposeTypes type)
99         {
100             if (disposed)
101             {
102                 return;
103             }
104
105             if(type == DisposeTypes.Explicit)
106             {
107                 //Called by User
108                 //Release your own managed resources here.
109                 //You should release all of your own disposable objects here.
110             }
111
112             //Release your own unmanaged resources here.
113             //You should not access any managed member here except static instance.
114             //because the execution order of Finalizes is non-deterministic.
115
116             if (swigCPtr.Handle != global::System.IntPtr.Zero)
117             {
118                 if (swigCMemOwn)
119                 {
120                     swigCMemOwn = false;
121                     NDalicPINVOKE.delete_Vector2(swigCPtr);
122                 }
123                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
124             }
125             disposed = true;
126         }
127
128         /// <summary>
129         /// The addition operator.
130         /// </summary>
131         /// <param name="arg1">The first value.</param>
132         /// <param name="arg2">The second value.</param>
133         /// <returns>The vector containing the result of the addition.</returns>
134         /// <since_tizen> 3 </since_tizen>
135         public static Vector2 operator +(Vector2 arg1, Vector2 arg2)
136         {
137             return arg1.Add(arg2);
138         }
139
140         /// <summary>
141         /// The subtraction operator.
142         /// </summary>
143         /// <param name="arg1">The first value.</param>
144         /// <param name="arg2">The second value.</param>
145         /// <returns>The vector containing the result of the subtraction.</returns>
146         /// <since_tizen> 3 </since_tizen>
147         public static Vector2 operator -(Vector2 arg1, Vector2 arg2)
148         {
149             return arg1.Subtract(arg2);
150         }
151
152         /// <summary>
153         /// The unary negation operator.
154         /// </summary>
155         /// <param name="arg1">The target value.</param>
156         /// <returns>The vector containing the negation.</returns>
157         /// <since_tizen> 3 </since_tizen>
158         public static Vector2 operator -(Vector2 arg1)
159         {
160             return arg1.Subtract();
161         }
162
163         /// <summary>
164         /// The multiplication operator.
165         /// </summary>
166         /// <param name="arg1">The first value.</param>
167         /// <param name="arg2">The second value.</param>
168         /// <returns>The vector containing the result of the multiplication.</returns>
169         /// <since_tizen> 3 </since_tizen>
170         public static Vector2 operator *(Vector2 arg1, Vector2 arg2)
171         {
172             return arg1.Multiply(arg2);
173         }
174
175         /// <summary>
176         /// Th multiplication operator.
177         /// </summary>
178         /// <param name="arg1">The first value.</param>
179         /// <param name="arg2">The float value to scale the vector.</param>
180         /// <returns>The vector containing the result of the scaling.</returns>
181         /// <since_tizen> 3 </since_tizen>
182         public static Vector2 operator *(Vector2 arg1, float arg2)
183         {
184             return arg1.Multiply(arg2);
185         }
186
187         /// <summary>
188         /// The division operator.
189         /// </summary>
190         /// <param name="arg1">The first value.</param>
191         /// <param name="arg2">The second value.</param>
192         /// <returns>The vector containing the result of the division.</returns>
193         /// <since_tizen> 3 </since_tizen>
194         public static Vector2 operator /(Vector2 arg1, Vector2 arg2)
195         {
196             return arg1.Divide(arg2);
197         }
198
199         /// <summary>
200         /// Th division operator.
201         /// </summary>
202         /// <param name="arg1">The first value.</param>
203         /// <param name="arg2">The float value to scale the vector by.</param>
204         /// <returns>The vector containing the result of the scaling.</returns>
205         /// <since_tizen> 3 </since_tizen>
206         public static Vector2 operator /(Vector2 arg1, float arg2)
207         {
208             return arg1.Divide(arg2);
209         }
210
211         /// <summary>
212         /// The array subscript operator overload.
213         /// </summary>
214         /// <param name="index">The subscript index.</param>
215         /// <returns>The float at the given index.</returns>
216         /// <since_tizen> 3 </since_tizen>
217         public float this[uint index]
218         {
219             get
220             {
221                 return ValueOfIndex(index);
222             }
223         }
224
225         internal static Vector2 GetVector2FromPtr(global::System.IntPtr cPtr)
226         {
227             Vector2 ret = new Vector2(cPtr, false);
228             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
229             return ret;
230         }
231
232         /// <summary>
233         /// The default constructor initializes the vector to 0.
234         /// </summary>
235         /// <since_tizen> 3 </since_tizen>
236         public Vector2() : this(NDalicPINVOKE.new_Vector2__SWIG_0(), true)
237         {
238             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
239         }
240
241         /// <summary>
242         /// The constructor.
243         /// </summary>
244         /// <param name="x">The x or width component.</param>
245         /// <param name="y">The y or height component.</param>
246         /// <since_tizen> 3 </since_tizen>
247         public Vector2(float x, float y) : this(NDalicPINVOKE.new_Vector2__SWIG_1(x, y), true)
248         {
249             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
250         }
251
252         /// <summary>
253         /// The conversion constructor from an array of two floats.
254         /// </summary>
255         /// <param name="array">The array of xy.</param>
256         /// <since_tizen> 3 </since_tizen>
257         public Vector2(float[] array) : this(NDalicPINVOKE.new_Vector2__SWIG_2(array), true)
258         {
259             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
260         }
261
262         /// <summary>
263         /// The constructor.
264         /// </summary>
265         /// <param name="vec3">Vector3 to create this vector from.</param>
266         /// <since_tizen> 3 </since_tizen>
267         public Vector2(Vector3 vec3) : this(NDalicPINVOKE.new_Vector2__SWIG_3(Vector3.getCPtr(vec3)), true)
268         {
269             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
270         }
271
272         /// <summary>
273         /// The constructor.
274         /// </summary>
275         /// <param name="vec4">Vector4 to create this vector from.</param>
276         /// <since_tizen> 3 </since_tizen>
277         public Vector2(Vector4 vec4) : this(NDalicPINVOKE.new_Vector2__SWIG_4(Vector4.getCPtr(vec4)), true)
278         {
279             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
280         }
281
282         /// <summary>
283         /// (1.0f,1.0f).
284         /// </summary>
285         /// <since_tizen> 3 </since_tizen>
286         public static Vector2 One
287         {
288             get
289             {
290                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector2_ONE_get();
291                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
292                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
293                 return ret;
294             }
295         }
296
297         /// <summary>
298         /// The vector representing the x-axis.
299         /// </summary>
300         /// <since_tizen> 3 </since_tizen>
301         public static Vector2 XAxis
302         {
303             get
304             {
305                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector2_XAXIS_get();
306                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
307                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
308                 return ret;
309             }
310         }
311
312         /// <summary>
313         /// The vector representing the y-axis.
314         /// </summary>
315         /// <since_tizen> 3 </since_tizen>
316         public static Vector2 YAxis
317         {
318             get
319             {
320                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector2_YAXIS_get();
321                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
322                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
323                 return ret;
324             }
325         }
326
327         /// <summary>
328         /// The vector representing the negative x-axis.
329         /// </summary>
330         /// <since_tizen> 3 </since_tizen>
331         public static Vector2 NegativeXAxis
332         {
333             get
334             {
335                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector2_NEGATIVE_XAXIS_get();
336                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
337                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
338                 return ret;
339             }
340         }
341
342         /// <summary>
343         /// The vector representing the negative y-axis.
344         /// </summary>
345         /// <since_tizen> 3 </since_tizen>
346         public static Vector2 NegativeYAxis
347         {
348             get
349             {
350                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector2_NEGATIVE_YAXIS_get();
351                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
352                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
353                 return ret;
354             }
355         }
356
357         /// <summary>
358         /// (0.0f, 0.0f).
359         /// </summary>
360         /// <since_tizen> 3 </since_tizen>
361         public static Vector2 Zero
362         {
363             get
364             {
365                 global::System.IntPtr cPtr = NDalicPINVOKE.Vector2_ZERO_get();
366                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
367                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
368                 return ret;
369             }
370         }
371
372         private Vector2 Add(Vector2 rhs)
373         {
374             Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_Add(swigCPtr, Vector2.getCPtr(rhs)), true);
375             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
376             return ret;
377         }
378
379         private Vector2 AddAssign(Vector2 rhs)
380         {
381             Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_AddAssign(swigCPtr, Vector2.getCPtr(rhs)), false);
382             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
383             return ret;
384         }
385
386         private Vector2 Subtract(Vector2 rhs)
387         {
388             Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_Subtract__SWIG_0(swigCPtr, Vector2.getCPtr(rhs)), true);
389             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
390             return ret;
391         }
392
393         private Vector2 SubtractAssign(Vector2 rhs)
394         {
395             Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_SubtractAssign(swigCPtr, Vector2.getCPtr(rhs)), false);
396             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
397             return ret;
398         }
399
400         private Vector2 Multiply(Vector2 rhs)
401         {
402             Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_Multiply__SWIG_0(swigCPtr, Vector2.getCPtr(rhs)), true);
403             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
404             return ret;
405         }
406
407         private Vector2 Multiply(float rhs)
408         {
409             Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_Multiply__SWIG_1(swigCPtr, rhs), true);
410             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
411             return ret;
412         }
413
414         private Vector2 MultiplyAssign(Vector2 rhs)
415         {
416             Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_MultiplyAssign__SWIG_0(swigCPtr, Vector2.getCPtr(rhs)), false);
417             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
418             return ret;
419         }
420
421         private Vector2 MultiplyAssign(float rhs)
422         {
423             Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_MultiplyAssign__SWIG_1(swigCPtr, rhs), false);
424             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
425             return ret;
426         }
427
428         private Vector2 Divide(Vector2 rhs)
429         {
430             Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_Divide__SWIG_0(swigCPtr, Vector2.getCPtr(rhs)), true);
431             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
432             return ret;
433         }
434
435         private Vector2 Divide(float rhs)
436         {
437             Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_Divide__SWIG_1(swigCPtr, rhs), true);
438             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
439             return ret;
440         }
441
442         private Vector2 DivideAssign(Vector2 rhs)
443         {
444             Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_DivideAssign__SWIG_0(swigCPtr, Vector2.getCPtr(rhs)), false);
445             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
446             return ret;
447         }
448
449         private Vector2 DivideAssign(float rhs)
450         {
451             Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_DivideAssign__SWIG_1(swigCPtr, rhs), false);
452             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
453             return ret;
454         }
455
456         private Vector2 Subtract()
457         {
458             Vector2 ret = new Vector2(NDalicPINVOKE.Vector2_Subtract__SWIG_1(swigCPtr), true);
459             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
460             return ret;
461         }
462
463         private bool EqualTo(Vector2 rhs)
464         {
465             bool ret = NDalicPINVOKE.Vector2_EqualTo(swigCPtr, Vector2.getCPtr(rhs));
466             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
467             return ret;
468         }
469
470         private bool NotEqualTo(Vector2 rhs)
471         {
472             bool ret = NDalicPINVOKE.Vector2_NotEqualTo(swigCPtr, Vector2.getCPtr(rhs));
473             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
474             return ret;
475         }
476
477         private float ValueOfIndex(uint index)
478         {
479             float ret = NDalicPINVOKE.Vector2_ValueOfIndex__SWIG_0(swigCPtr, index);
480             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
481             return ret;
482         }
483
484         /// <summary>
485         /// Determines whether the specified object is equal to the current object.
486         /// </summary>
487         /// <param name="obj">The object to compare with the current object.</param>
488         /// <returns>true if the specified object is equal to the current object; otherwise, false.</returns>
489         public override bool Equals(System.Object obj)
490         {
491             Vector2 vector2 = obj as Vector2;
492             bool equal = false;
493             if (X == vector2?.X && Y == vector2?.Y)
494             {
495                 equal = true;
496             }
497             return equal;
498         }
499
500         /// <summary>
501         /// Gets the the hash code of this Vector2.
502         /// </summary>
503         /// <returns>The Hash Code.</returns>
504         /// <since_tizen> 5 </since_tizen>
505         public override int GetHashCode()
506         {
507             return X.GetHashCode();
508         }
509
510         /// <summary>
511         /// Returns the length of the vector.
512         /// </summary>
513         /// <returns>The length of the vector.</returns>
514         /// <since_tizen> 3 </since_tizen>
515         public float Length()
516         {
517             float ret = NDalicPINVOKE.Vector2_Length(swigCPtr);
518             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
519             return ret;
520         }
521
522         /// <summary>
523         /// Returns the length of the vector squared.<br />
524         /// This is more efficient than Length() for threshold
525         /// testing as it avoids the use of a square root.<br />
526         /// </summary>
527         /// <returns>The length of the vector squared</returns>
528         /// <since_tizen> 3 </since_tizen>
529         public float LengthSquared()
530         {
531             float ret = NDalicPINVOKE.Vector2_LengthSquared(swigCPtr);
532             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
533             return ret;
534         }
535
536         /// <summary>
537         /// Sets the vector to be the unit length, whilst maintaining its direction.
538         /// </summary>
539         /// <since_tizen> 3 </since_tizen>
540         public void Normalize()
541         {
542             NDalicPINVOKE.Vector2_Normalize(swigCPtr);
543             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
544         }
545
546         /// <summary>
547         /// Clamps the vector between minimum and maximum vectors.
548         /// </summary>
549         /// <param name="min">The minimum vector.</param>
550         /// <param name="max">The maximum vector.</param>
551         /// <since_tizen> 3 </since_tizen>
552         public void Clamp(Vector2 min, Vector2 max)
553         {
554             NDalicPINVOKE.Vector2_Clamp(swigCPtr, Vector2.getCPtr(min), Vector2.getCPtr(max));
555             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
556         }
557
558         internal SWIGTYPE_p_float AsFloat()
559         {
560             global::System.IntPtr cPtr = NDalicPINVOKE.Vector2_AsFloat__SWIG_0(swigCPtr);
561             SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false);
562             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
563             return ret;
564         }
565
566         /// <summary>
567         /// The x component.
568         /// </summary>
569         /// <since_tizen> 3 </since_tizen>
570         public float X
571         {
572             set
573             {
574                 NDalicPINVOKE.Vector2_X_set(swigCPtr, value);
575                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
576             }
577             get
578             {
579                 float ret = NDalicPINVOKE.Vector2_X_get(swigCPtr);
580                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
581                 return ret;
582             }
583         }
584
585         /// <summary>
586         /// The width.
587         /// </summary>
588         /// <since_tizen> 3 </since_tizen>
589         public float Width
590         {
591             set
592             {
593                 NDalicPINVOKE.Vector2_Width_set(swigCPtr, value);
594                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
595             }
596             get
597             {
598                 float ret = NDalicPINVOKE.Vector2_Width_get(swigCPtr);
599                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
600                 return ret;
601             }
602         }
603
604         /// <summary>
605         /// The y component.
606         /// </summary>
607         /// <since_tizen> 3 </since_tizen>
608         public float Y
609         {
610             set
611             {
612                 NDalicPINVOKE.Vector2_Y_set(swigCPtr, value);
613                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
614             }
615             get
616             {
617                 float ret = NDalicPINVOKE.Vector2_Y_get(swigCPtr);
618                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
619                 return ret;
620             }
621         }
622
623         /// <summary>
624         /// The height.
625         /// </summary>
626         /// <since_tizen> 3 </since_tizen>
627         public float Height
628         {
629             set
630             {
631                 NDalicPINVOKE.Vector2_Height_set(swigCPtr, value);
632                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
633             }
634             get
635             {
636                 float ret = NDalicPINVOKE.Vector2_Height_get(swigCPtr);
637                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
638                 return ret;
639             }
640         }
641
642     }
643
644 }