Setting since_tizen 3/4 on Tizen.NET API
[platform/core/csapi/tizenfx.git] / src / Tizen.Multimedia.Camera / Camera / FaceDetectionData.cs
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
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 System.Runtime.InteropServices;
19 using static Interop.Camera;
20
21 namespace Tizen.Multimedia
22 {
23     /// <summary>
24     /// The class contains the details of the detected face.
25     /// </summary>
26     /// <since_tizen> 3 </since_tizen>
27     public class FaceDetectionData
28     {
29         internal FaceDetectionData(IntPtr ptr)
30         {
31             var unmanagedStruct = Marshal.PtrToStructure<DetectedFaceStruct>(ptr);
32
33             Id = unmanagedStruct.Id;
34             Score = unmanagedStruct.Score;
35             X = unmanagedStruct.X;
36             Y = unmanagedStruct.Y;
37             Width = unmanagedStruct.Width;
38             Height = unmanagedStruct.Height;
39         }
40
41         /// <summary>
42         /// The ID of each face.
43         /// </summary>
44         /// <since_tizen> 3 </since_tizen>
45         public int Id { get; }
46
47         /// <summary>
48         /// The confidence level for the detection of the face.
49         /// </summary>
50         /// <since_tizen> 3 </since_tizen>
51         public int Score { get; }
52
53         /// <summary>
54         /// The X co-ordinate of the face.
55         /// </summary>
56         /// <since_tizen> 3 </since_tizen>
57         public int X { get; }
58
59         /// <summary>
60         /// The Y co-ordinate of the face.
61         /// </summary>
62         /// <since_tizen> 3 </since_tizen>
63         public int Y { get; }
64
65         /// <summary>
66         /// The width of the face.
67         /// </summary>
68         /// <since_tizen> 3 </since_tizen>
69         public int Width { get; }
70
71         /// <summary>
72         /// The height of the face.
73         /// </summary>
74         /// <since_tizen> 3 </since_tizen>
75         public int Height { get; }
76     }
77 }