#pragma once #include 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 VectorDrawData_Glass; typedef std::vector::iterator VectorDrawData_GlassIt; typedef std::vector::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 VectorResultData_Cell; typedef std::vector::iterator VectorResultData_CellIt; typedef std::vector::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 VectorDrawData_Cell; typedef std::vector::iterator VectorDrawData_CellIt; typedef std::vector::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 VectorResultData_Defect; typedef std::vector::iterator VectorResultData_DefectIt; typedef std::vector::const_iterator constVectorResultData_DefectIt; class CDrawData_Defect : public CDrawData { public: CDrawData_Defect(void) : CDrawData() { } }; typedef std::vector VectorDrawData_Defect; typedef std::vector::iterator VectorDrawData_DefectIt; typedef std::vector::const_iterator constVectorDrawData_DefectIt;