SDC C-Project CF Review 프로그램
LYW
2021-06-23 598cef9de915e5554fc2f7572b24f15d8a4acf41
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
#pragma once
 
#include <vector>
 
enum MapDraw_Type            { MDT_Auto=0, MDT_Horiz, MDT_Vert, MDT_Fit, MDT_Count };
enum MapOriginDir_Type        { MODT_LeftTop=0, MODT_RightTop, MODT_LeftBottom, MODT_RightBottom, MODT_Count };
 
enum ColorBandShiftValue
{
    AlphaShiftValue  = 24,
    RedShiftValue    = 16,
    GreenShiftValue  = 8,
    BlueShiftValue   = 0
};
 
static UINT MakeColor(BYTE a, BYTE r, BYTE g, BYTE b)
{
    return (((UINT) (b) <<  BlueShiftValue) |
        ((UINT) (g) << GreenShiftValue) |
        ((UINT) (r) <<   RedShiftValue) |
        ((UINT) (a) << AlphaShiftValue));
}
 
class CDrawData
{
public:
    CDrawData(void) { Reset(); }
    void Reset(void)
    {
        nIndex            = 0;
        strName            = _T("");
        nPenColor        = MakeColor(0,0,0,0);
        nBrushColor        = MakeColor(0,0,0,0);
        fPenOpacity        = 1.0f;
        fBrushOpacity    = 1.0f;
        fPenSize        = 0.01f; 
 
        fLeft            = 0.0f;
        fTop            = 0.0f;
        fRight            = 0.0f;
        fBottom            = 0.0f;
    }
 
    float Width() const        { return fRight - fLeft; }
    float Height() const    { return fBottom - fTop; }
 
    int            nIndex;                // ¼ø¹ø
    CString        strName;            // À̸§
    UINT        nPenColor;            // Ææ Ä÷¯
    UINT        nBrushColor;        // ºê·¯½Ã Ä÷¯
    float        fPenSize;            // Ææ Å©±â // pixel
    float        fPenOpacity;        // Ææ ºÒÅõ¸íµµ        (0~1)
    float        fBrushOpacity;        // ºê·¯½Ã ºÒÅõ¸íµµ    (0~1)
 
    float        fLeft;                // ¿øÁ¡ X //um
    float        fTop;                // ¿øÁ¡ Y //um
    float        fRight;                // »çÀÌÁî X //um
    float        fBottom;            // »çÀÌÁî Y //um
};
 
class CResultData_Glass
{
public:
    CResultData_Glass()
    {
 
    }
 
    int        nOriginDir;
    int        nCornerDir;
    int        nSizeX;
    int        nSizeY;
};
 
class CDrawData_Glass : public CDrawData
{
public:
    CDrawData_Glass(void) : CDrawData()
    {
        nOriginDir        = MODT_LeftTop;
        nCornerDir        = MODT_RightBottom;
        fGlassWidth        = 1500.f;
        fGlassHeight    = 1300.f;
        fRulerWidth        = 300.f;
        fRulerHeight    = 300.f;
 
        fLeft            = 0.f;
        fTop            = 0.f;
        fRight            = fLeft + fGlassWidth;
        fBottom            = fTop + fGlassHeight;
 
        nPenColor        = MakeColor(0,150,150,150);
        nBrushColor        = MakeColor(0,192,192,192);
        fPenOpacity        = 1.0f;
        fBrushOpacity    = 1.0f;
        fPenSize        = 1.0f; 
        fRulerStrokeWidth    = 1.0f;
 
        fCornerSize        = 10.f;
        nCornerColor    = MakeColor(0, 192,0,0);
    }
 
    int        nOriginDir;
    int        nCornerDir;
    float    fGlassWidth;
    float    fGlassHeight;
 
    float    fRulerWidth;
    float    fRulerHeight;
    float    fRulerStrokeWidth;
 
    float    fCornerSize;
    UINT    nCornerColor;
};
typedef std::vector<CDrawData_Glass>                        VectorDrawData_Glass;
typedef std::vector<CDrawData_Glass>::iterator                VectorDrawData_GlassIt;
typedef std::vector<CDrawData_Glass>::const_iterator        constVectorDrawData_GlassIt;
 
class CResultData_Cell
{
public:
    CResultData_Cell()
    {
 
    }
 
    int            nOriginDir;
    int            nPosX;
    int            nPosY;
    int            nSizeX;
    int            nSizeY;
    CString        strCellID;
};
typedef std::vector<CResultData_Cell*>                        VectorResultData_Cell;
typedef std::vector<CResultData_Cell*>::iterator            VectorResultData_CellIt;
typedef std::vector<CResultData_Cell*>::const_iterator        constVectorResultData_CellIt;
 
class CDrawData_Cell : public CDrawData
{
public:
    CDrawData_Cell(void) : CDrawData()
    {
        fLeft            = 100.f;
        fTop            = 100.f;
        fRight            = fLeft + 300;
        fBottom            = fTop + 300;
 
        nPenColor        = MakeColor(0,150,150,150);
        nBrushColor        = MakeColor(0,210,210,55);
        fPenOpacity        = 1.0f;
        fBrushOpacity    = 1.0f;
        fPenSize        = 1.0f; 
    }
};
typedef std::vector<CDrawData_Cell>                        VectorDrawData_Cell;
typedef std::vector<CDrawData_Cell>::iterator            VectorDrawData_CellIt;
typedef std::vector<CDrawData_Cell>::const_iterator        constVectorDrawData_CellIt;
 
class CResultData_Defect
{
public:
    CResultData_Defect()
    {
 
    }
 
    int        nOpticType;
    int        nGrayType;
    int        nSizeType;
    int        nStackType;
 
    int        nCenterX;
    int        nCenterY;
    int        nPointX;
    int        nPointY;
    int        nWidth;
    int        nHeight;
};
typedef std::vector<CResultData_Defect*>                    VectorResultData_Defect;
typedef std::vector<CResultData_Defect*>::iterator            VectorResultData_DefectIt;
typedef std::vector<CResultData_Defect*>::const_iterator    constVectorResultData_DefectIt;
 
class CDrawData_Defect : public CDrawData
{
public:
    CDrawData_Defect(void) : CDrawData()
    {
    }
};
typedef std::vector<CDrawData_Defect>                        VectorDrawData_Defect;
typedef std::vector<CDrawData_Defect>::iterator                VectorDrawData_DefectIt;
typedef std::vector<CDrawData_Defect>::const_iterator        constVectorDrawData_DefectIt;