root/lang/cpluspluscli/OpenCvSharp2/trunk/OpenCvSharp.Extern/WCvFont.h @ 31568

Revision 31568, 1.8 kB (checked in by schima, 4 years ago)

C style cast -> C++ style cast

Line 
1/**
2 * (C) 2008-2009 Schima
3 * This code is licenced under the LGPL.
4 */
5
6#pragma once
7
8
9namespace KwsmLab {
10namespace OpenCvSharp {
11namespace Extern
12{
13        /// <summary>
14        /// フォント
15        /// </summary>
16        public ref class WCvFont
17        {
18        private:
19                CvFont* _ptr;
20
21        public:
22                /// <summary>
23                /// 元データであるCvFont*を取得する
24                /// </summary>
25                initonly IntPtr Ptr;
26                /// <summary>
27                /// sizeof(CvFont) を取得する
28                /// </summary>
29                literal Int32 SizeOf = static_cast<Int32>(sizeof(CvFont));
30
31                /// <summary>
32                /// 初期化
33                /// </summary>
34                WCvFont(IntPtr ptr)
35                {
36                        this->_ptr = static_cast<CvFont*>(ptr.ToPointer());
37                        this->Ptr = IntPtr(ptr);
38                }
39
40                property int font_face {
41                        int get(){ return _ptr->font_face; }
42                        void set(int value){ _ptr->font_face = value; }
43                };
44                property IntPtr ascii{
45                        IntPtr get(){ return IntPtr(const_cast<int*>(_ptr->ascii)); }
46                }
47                property IntPtr greek{
48                        IntPtr get(){ return IntPtr(const_cast<int*>(_ptr->greek)); }
49                }
50                property IntPtr cyrillic{
51                        IntPtr get(){ return IntPtr(const_cast<int*>(_ptr->cyrillic)); }
52                }
53                property float hscale {
54                        float get(){ return _ptr->hscale; }
55                        void set(float value){ _ptr->hscale = value; }
56                };
57                property float vscale {
58                        float get(){ return _ptr->vscale; }
59                        void set(float value){ _ptr->vscale = value; }
60                };
61                property float shear {
62                        float get(){ return _ptr->shear; }
63                        void set(float value){ _ptr->shear = value; }
64                };
65                property int thickness {
66                        int get(){ return _ptr->thickness; }
67                        void set(int value){ _ptr->thickness = value; }
68                };
69                property float dx {
70                        float get(){ return _ptr->dx; }
71                        void set(float value){ _ptr->dx = value; }
72                };
73                property int line_type {
74                        int get(){ return _ptr->line_type; }
75                        void set(int value){ _ptr->line_type = value; }
76                };
77
78        };
79}
80}
81}
Note: See TracBrowser for help on using the browser.