[NUI] refactoring GraphicsType classes and Dp. Add new Type Sp
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Utility / GraphicsTypeExtensions.cs
1 using System.ComponentModel;
2
3 namespace Tizen.NUI
4 {
5     /// <summary>
6     /// The GraphicTypeExtensions class is graphics type converter for pixel based object.
7     /// Density independent pixel(dp) unit is our basic target type and you can get converted value by PxToDp(),
8     /// and you can get original pixel by PxToDp().
9     /// One dp is a virtual pixel unit that's roughly equal to one pixel on a medium-density(160dpi) screen.
10     /// See <see cref="Tizen.NUI.GraphicsTypeManager" /> and <see cref="Tizen.NUI.GraphicsTypeConverter" /> also.
11     /// </summary>
12     /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
13     [EditorBrowsable(EditorBrowsableState.Never)]
14     public static class GraphicsTypeExtensions
15     {
16         /// <summary>
17         /// Converter float dp to pixel.
18         /// </summary>
19         /// <param name="dp">The float dp unit value to be converted pixel unit.</param>
20         /// <returns>The float pixel unit value.</returns>
21         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
22         [EditorBrowsable(EditorBrowsableState.Never)]
23         public static float DpToPx(this float dp)
24         {
25             return GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp);
26         }
27
28         /// <summary>
29         /// Converter float sp to pixel.
30         /// </summary>
31         /// <param name="sp">The float sp unit value to be converted pixel unit.</param>
32         /// <returns>The float pixel unit value.</returns>
33         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
34         [EditorBrowsable(EditorBrowsableState.Never)]
35         public static float SpToPx(this float sp)
36         {
37             return GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp);
38         }
39
40         /// <summary>
41         /// Converter float pixel to dp.
42         /// </summary>
43         /// <param name="pixel">The float pixel unit value to be converted dp unit.</param>
44         /// <returns>The float dp unit value.</returns>
45         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
46         [EditorBrowsable(EditorBrowsableState.Never)]
47         public static float PxToDp(this float pixel)
48         {
49             return GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel);
50         }
51
52         /// <summary>
53         /// Converter float pixel to sp.
54         /// </summary>
55         /// <param name="pixel">The float pixel unit value to be converted sp unit.</param>
56         /// <returns>The float sp unit value.</returns>
57         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
58         [EditorBrowsable(EditorBrowsableState.Never)]
59         public static float PxToSp(this float pixel)
60         {
61             return GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel);
62         }
63
64         /// <summary>
65         /// Converter int dp to pixel.
66         /// </summary>
67         /// <param name="dp">The int dp unit value to be converted pixel unit.</param>
68         /// <returns>The int pixel unit value.</returns>
69         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
70         [EditorBrowsable(EditorBrowsableState.Never)]
71         public static int DpToPx(this int dp)
72         {
73             return (int)GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp);
74         }
75
76         /// <summary>
77         /// Converter int dp to pixel.
78         /// </summary>
79         /// <param name="sp">The int sp unit value to be converted pixel unit.</param>
80         /// <returns>The int pixel unit value.</returns>
81         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
82         [EditorBrowsable(EditorBrowsableState.Never)]
83         public static int SpToPx(this int sp)
84         {
85             return (int)GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp);
86         }
87
88         /// <summary>
89         /// Converter int pixel to dp.
90         /// </summary>
91         /// <param name="pixel">The int pixel unit value to be converted dp unit.</param>
92         /// <returns>The int dp unit value.</returns>
93         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
94         [EditorBrowsable(EditorBrowsableState.Never)]
95         public static int PxToDp(this int pixel)
96         {
97             return (int)GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel);
98         }
99
100         /// <summary>
101         /// Converter int pixel to sp.
102         /// </summary>
103         /// <param name="pixel">The int pixel unit value to be converted sp unit.</param>
104         /// <returns>The int sp unit value.</returns>
105         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
106         [EditorBrowsable(EditorBrowsableState.Never)]
107         public static int PxToSp(this int pixel)
108         {
109             return (int)GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel);
110         }
111
112
113         /// <summary>
114         /// Converter Size pixel to dp.
115         /// </summary>
116         /// <param name="pixel">The Size pixel unit value to be converted dp unit.</param>
117         /// <returns>The Size dp unit value.</returns>
118         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
119         [EditorBrowsable(EditorBrowsableState.Never)]
120         public static Size PxToDp(this Size pixel)
121         {
122             if (pixel == null) return null;
123             return new Size(GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.Width),
124                             GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.Height));
125         }
126
127         /// <summary>
128         /// Converter Size pixel to sp.
129         /// </summary>
130         /// <param name="pixel">The Size pixel unit value to be converted sp unit.</param>
131         /// <returns>The Size sp unit value.</returns>
132         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
133         [EditorBrowsable(EditorBrowsableState.Never)]
134         public static Size PxToSp(this Size pixel)
135         {
136             if (pixel == null) return null;
137             return new Size(GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.Width),
138                             GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.Height));
139         }
140
141         /// <summary>
142         /// Converter Size dp to pixel.
143         /// </summary>
144         /// <param name="dp">The Size dp unit value to be converted pixel unit.</param>
145         /// <returns>The Size pixel unit value.</returns>
146         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
147         [EditorBrowsable(EditorBrowsableState.Never)]
148         public static Size DpToPx(this Size dp)
149         {
150             if (dp == null) return null;
151             return new Size(GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.Width),
152                             GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.Height));
153         }
154
155         /// <summary>
156         /// Converter Size sp to pixel.
157         /// </summary>
158         /// <param name="sp">The Size sp unit value to be converted pixel unit.</param>
159         /// <returns>The Size pixel unit value.</returns>
160         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
161         [EditorBrowsable(EditorBrowsableState.Never)]
162         public static Size SpToPx(this Size sp)
163         {
164             if (sp == null) return null;
165             return new Size(GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.Width),
166                             GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.Height));
167         }
168
169         /// <summary>
170         /// Converter Size2D pixel to dp.
171         /// </summary>
172         /// <param name="pixel">The Size2D pixel unit value to be converted dp unit.</param>
173         /// <returns>The Size2D dp unit value.</returns>
174         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
175         [EditorBrowsable(EditorBrowsableState.Never)]
176         public static Size2D PxToDp(this Size2D pixel)
177         {
178             if (pixel == null) return null;
179             return new Size2D((int)GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.Width),
180                               (int)GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.Height));
181         }
182
183         /// <summary>
184         /// Converter Size2D pixel to sp.
185         /// </summary>
186         /// <param name="pixel">The Size2D pixel unit value to be converted sp unit.</param>
187         /// <returns>The Size2D sp unit value.</returns>
188         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
189         [EditorBrowsable(EditorBrowsableState.Never)]
190         public static Size2D PxToSp(this Size2D pixel)
191         {
192             if (pixel == null) return null;
193             return new Size2D((int)GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.Width),
194                               (int)GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.Height));
195         }
196
197         /// <summary>
198         /// Converter Size2D dp to pixel.
199         /// </summary>
200         /// <param name="dp">The Size2D dp unit value to be converted pixel unit.</param>
201         /// <returns>The Size2D pixel unit value.</returns>
202         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
203         [EditorBrowsable(EditorBrowsableState.Never)]
204         public static Size2D DpToPx(this Size2D dp)
205         {
206             if (dp == null) return null;
207             return new Size2D((int)GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.Width),
208                               (int)GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.Height));
209         }
210
211         /// <summary>
212         /// Converter Size2D sp to pixel.
213         /// </summary>
214         /// <param name="sp">The Size2D sp unit value to be converted pixel unit.</param>
215         /// <returns>The Size2D pixel unit value.</returns>
216         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
217         [EditorBrowsable(EditorBrowsableState.Never)]
218         public static Size2D SpToPx(this Size2D sp)
219         {
220             if (sp == null) return null;
221             return new Size2D((int)GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.Width),
222                               (int)GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.Height));
223         }
224
225         /// <summary>
226         /// Converter Position pixel to dp.
227         /// </summary>
228         /// <param name="pixel">The Position pixel unit value to be converted dp unit.</param>
229         /// <returns>The Position dp unit value.</returns>
230         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
231         [EditorBrowsable(EditorBrowsableState.Never)]
232         public static Position PxToDp(this Position pixel)
233         {
234             if (pixel == null) return null;
235             return new Position(GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.X),
236                                 GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.Y));
237         }
238
239         /// <summary>
240         /// Converter Position pixel to sp.
241         /// </summary>
242         /// <param name="pixel">The Position pixel unit value to be converted sp unit.</param>
243         /// <returns>The Position sp unit value.</returns>
244         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
245         [EditorBrowsable(EditorBrowsableState.Never)]
246         public static Position PxToSp(this Position pixel)
247         {
248             if (pixel == null) return null;
249             return new Position(GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.X),
250                                 GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.Y));
251         }
252
253         /// <summary>
254         /// Converter Position dp to pixel.
255         /// </summary>
256         /// <param name="dp">The Position dp unit value to be converted pixel unit.</param>
257         /// <returns>The Position pixel unit value.</returns>
258         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
259         [EditorBrowsable(EditorBrowsableState.Never)]
260         public static Position DpToPx(this Position dp)
261         {
262             if (dp == null) return null;
263             return new Position(GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.X),
264                                 GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.Y));
265         }
266
267         /// <summary>
268         /// Converter Position sp to pixel.
269         /// </summary>
270         /// <param name="sp">The Position sp unit value to be converted pixel unit.</param>
271         /// <returns>The Position pixel unit value.</returns>
272         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
273         [EditorBrowsable(EditorBrowsableState.Never)]
274         public static Position SpToPx(this Position sp)
275         {
276             if (sp == null) return null;
277             return new Position(GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.X),
278                                 GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.Y));
279         }
280
281         /// <summary>
282         /// Converter Position2D pixel to dp.
283         /// </summary>
284         /// <param name="pixel">The Position2D pixel unit value to be converted dp unit.</param>
285         /// <returns>The Position2D dp unit value.</returns>
286         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
287         [EditorBrowsable(EditorBrowsableState.Never)]
288         public static Position2D PxToDp(this Position2D pixel)
289         {
290             if (pixel == null) return null;
291             return new Position2D((int)GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.X),
292                                   (int)GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.Y));
293         }
294
295         /// <summary>
296         /// Converter Position2D pixel to sp.
297         /// </summary>
298         /// <param name="pixel">The Position2D pixel unit value to be converted sp unit.</param>
299         /// <returns>The Position2D sp unit value.</returns>
300         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
301         [EditorBrowsable(EditorBrowsableState.Never)]
302         public static Position2D PxToSp(this Position2D pixel)
303         {
304             if (pixel == null) return null;
305             return new Position2D((int)GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.X),
306                                   (int)GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.Y));
307         }
308
309         /// <summary>
310         /// Converter Position2D dp to pixel.
311         /// </summary>
312         /// <param name="dp">The Position2D dp unit value to be converted pixel unit.</param>
313         /// <returns>The Position2D pixel unit value.</returns>
314         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
315         [EditorBrowsable(EditorBrowsableState.Never)]
316         public static Position2D DpToPx(this Position2D dp)
317         {
318             if (dp == null) return null;
319             return new Position2D((int)GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.X),
320                                   (int)GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.Y));
321         }
322
323         /// <summary>
324         /// Converter Position2D sp to pixel.
325         /// </summary>
326         /// <param name="sp">The Position2D sp unit value to be converted pixel unit.</param>
327         /// <returns>The Position2D pixel unit value.</returns>
328         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
329         [EditorBrowsable(EditorBrowsableState.Never)]
330         public static Position2D SpToPx(this Position2D sp)
331         {
332             if (sp == null) return null;
333             return new Position2D((int)GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.X),
334                                   (int)GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.Y));
335         }
336
337         /// <summary>
338         /// Converter Rectangle pixel to dp.
339         /// </summary>
340         /// <param name="pixel">The Rectangle pixel unit value to be converted dp unit.</param>
341         /// <returns>The Rectangle dp unit value.</returns>
342         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
343         [EditorBrowsable(EditorBrowsableState.Never)]
344         public static Rectangle PxToDp(this Rectangle pixel)
345         {
346             if (pixel == null) return null;
347             return new Rectangle((int)GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.X),
348                                  (int)GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.Y),
349                                  (int)GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.Width),
350                                  (int)GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.Height));
351         }
352
353         /// <summary>
354         /// Converter Rectangle pixel to sp.
355         /// </summary>
356         /// <param name="pixel">The Rectangle pixel unit value to be converted sp unit.</param>
357         /// <returns>The Rectangle sp unit value.</returns>
358         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
359         [EditorBrowsable(EditorBrowsableState.Never)]
360         public static Rectangle PxToSp(this Rectangle pixel)
361         {
362             if (pixel == null) return null;
363             return new Rectangle((int)GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.X),
364                                  (int)GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.Y),
365                                  (int)GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.Width),
366                                  (int)GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.Height));
367         }
368
369         /// <summary>
370         /// Converter Rectangle dp to pixel.
371         /// </summary>
372         /// <param name="dp">The Rectangle dp unit value to be converted pixel unit.</param>
373         /// <returns>The Rectangle pixel unit value.</returns>
374         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
375         [EditorBrowsable(EditorBrowsableState.Never)]
376         public static Rectangle DpToPx(this Rectangle dp)
377         {
378             if (dp == null) return null;
379             return new Rectangle((int)GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.X),
380                                  (int)GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.Y),
381                                  (int)GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.Width),
382                                  (int)GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.Height));
383         }
384
385         /// <summary>
386         /// Converter Rectangle sp to pixel.
387         /// </summary>
388         /// <param name="sp">The Rectangle sp unit value to be converted pixel unit.</param>
389         /// <returns>The Rectangle pixel unit value.</returns>
390         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
391         [EditorBrowsable(EditorBrowsableState.Never)]
392         public static Rectangle SpToPx(this Rectangle sp)
393         {
394             if (sp == null) return null;
395             return new Rectangle((int)GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.X),
396                                  (int)GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.Y),
397                                  (int)GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.Width),
398                                  (int)GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.Height));
399         }
400
401         /// <summary>
402         /// Converter Extents pixel to dp.
403         /// </summary>
404         /// <param name="pixel">The Extents pixel unit value to be converted dp unit.</param>
405         /// <returns>The Extents dp unit value.</returns>
406         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
407         [EditorBrowsable(EditorBrowsableState.Never)]
408         public static Extents PxToDp(this Extents pixel)
409         {
410             if (pixel == null) return null;
411             return new Extents((ushort)GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.Start),
412                                (ushort)GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.End),
413                                (ushort)GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.Top),
414                                (ushort)GraphicsTypeManager.Instance.Dp.ConvertFromPixel(pixel.Bottom));
415         }
416
417         /// <summary>
418         /// Converter Extents pixel to sp.
419         /// </summary>
420         /// <param name="pixel">The Extents pixel unit value to be converted sp unit.</param>
421         /// <returns>The Extents sp unit value.</returns>
422         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
423         [EditorBrowsable(EditorBrowsableState.Never)]
424         public static Extents PxToSp(this Extents pixel)
425         {
426             if (pixel == null) return null;
427             return new Extents((ushort)GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.Start),
428                                (ushort)GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.End),
429                                (ushort)GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.Top),
430                                (ushort)GraphicsTypeManager.Instance.Sp.ConvertFromPixel(pixel.Bottom));
431         }
432
433         /// <summary>
434         /// Converter Extents dp to pixel.
435         /// </summary>
436         /// <param name="dp">The Extents dp unit value to be converted pixel unit.</param>
437         /// <returns>The Extents pixel unit value.</returns>
438         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
439         [EditorBrowsable(EditorBrowsableState.Never)]
440         public static Extents DpToPx(this Extents dp)
441         {
442             if (dp == null) return null;
443             return new Extents((ushort)GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.Start),
444                                (ushort)GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.End),
445                                (ushort)GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.Top),
446                                (ushort)GraphicsTypeManager.Instance.Dp.ConvertToPixel(dp.Bottom));
447         }
448
449         /// <summary>
450         /// Converter Extents sp to pixel.
451         /// </summary>
452         /// <param name="sp">The Extents sp unit value to be converted pixel unit.</param>
453         /// <returns>The Extents pixel unit value.</returns>
454         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
455         [EditorBrowsable(EditorBrowsableState.Never)]
456         public static Extents SpToPx(this Extents sp)
457         {
458             if (sp == null) return null;
459             return new Extents((ushort)GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.Start),
460                                (ushort)GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.End),
461                                (ushort)GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.Top),
462                                (ushort)GraphicsTypeManager.Instance.Sp.ConvertToPixel(sp.Bottom));
463         }
464
465         /// <summary>
466         /// Converter float font pixel size to point size.
467         /// </summary>
468         /// <param name="pixel">The float pixel unit value to be converted point unit.</param>
469         /// <returns>The float point unit value.</returns>
470         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
471         [EditorBrowsable(EditorBrowsableState.Never)]
472         public static float PxToPt(this float pixel)
473         {
474             return GraphicsTypeManager.Instance.Point.ConvertFromPixel(pixel);
475         }
476
477         /// <summary>
478         /// Converter float font point size to pixel size.
479         /// </summary>
480         /// <param name="pt">The float point unit value to be converted pixel unit.</param>
481         /// <returns>The float pixel unit value.</returns>
482         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
483         [EditorBrowsable(EditorBrowsableState.Never)]
484         public static float PtToPixel(this float pt)
485         {
486             return GraphicsTypeManager.Instance.Point.ConvertToPixel(pt);
487         }
488
489         /// <summary>
490         /// Converter float font dp size to point size.
491         /// 16.0f.DpToPt() = 7.2f.
492         /// </summary>
493         /// <param name="dp">The float dp unit value to be converted point unit.</param>
494         /// <returns>The float point unit value.</returns>
495         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
496         [EditorBrowsable(EditorBrowsableState.Never)]
497         public static float DpToPt(this float dp)
498         {
499             return GraphicsTypeManager.Instance.Point.ConvertDpToPoint(dp);
500         }
501
502         /// <summary>
503         /// Converter float font point size to dp size.
504         /// 7.2f.PtToDp() = 16.0f.
505         /// </summary>
506         /// <param name="pt">The float point unit value to be converted dp unit.</param>
507         /// <returns>The float dp unit value.</returns>
508         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
509         [EditorBrowsable(EditorBrowsableState.Never)]
510         public static float PtToDp(this float pt)
511         {
512             return GraphicsTypeManager.Instance.Point.ConvertPointToDp(pt);
513         }
514     }
515 }