2 * Copyright(c) 2019 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.
17 using System.ComponentModel;
22 /// An angle in degrees.<br />
23 /// This reduces ambiguity when using methods which accept angles in degrees or radians.<br />
25 /// <since_tizen> 3 </since_tizen>
26 public class Degree : Disposable
32 /// <since_tizen> 3 </since_tizen>
33 public Degree() : this(Interop.Degree.NewDegree(), true)
35 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
39 /// Creates an angle in degrees.
41 /// <param name="value">The initial value in degrees.</param>
42 /// <since_tizen> 3 </since_tizen>
43 public Degree(float value) : this(Interop.Degree.NewDegree(value), true)
45 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
49 /// Creates an angle in degrees from a radian.
51 /// <param name="value">The initial value in radians.</param>
52 /// <since_tizen> 3 </since_tizen>
53 public Degree(Radian value) : this(Interop.Degree.NewDegree(Radian.getCPtr(value)), true)
55 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
58 internal Degree(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
63 /// The value of degree.
65 /// <since_tizen> 3 </since_tizen>
70 Interop.Degree.DegreeSet(swigCPtr, value);
71 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
75 float ret = Interop.Degree.DegreeGet(swigCPtr);
76 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
81 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Degree obj)
83 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
86 /// This will not be public opened.
87 [EditorBrowsable(EditorBrowsableState.Never)]
88 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
90 Interop.Degree.DeleteDegree(swigCPtr);