| | |
| | | m_RowColor[2] = RGB(220,20,220); |
| | | m_RowColor[3] = RGB(20,220,220); |
| | | m_RowColor[4] = RGB(220, 20, 80); |
| | | for (int i=0; i<5; i++) |
| | | m_RowColor[5] = RGB(255, 128, 0); |
| | | for (int i=0; i<6; i++) |
| | | { |
| | | m_pDefectPen[i].CreatePen(PS_SOLID, 1, m_RowColor[i]); |
| | | m_pDefectBrush[i].CreateSolidBrush(m_RowColor[i]); |
| | | } |
| | | // m_pOffsetPen.CreatePen(PS_SOLID, 1, RGB(100, 200, 80)); |
| | | // m_pOffsetBrush.CreateSolidBrush(RGB(100, 200, 80)); |
| | | |
| | | m_nPlanIndex = 0; |
| | | m_bHistoryEnable = TRUE; |
| | |
| | | nCamSacnIndex = nScanidx; |
| | | nGlassMax = nXpos; |
| | | nGlassMin = nYpos; |
| | | } |
| | | |
| | | void CDefectMap::SetOffsetparm(int nCamidx, int nScanidx, BOOL bUse) |
| | | { |
| | | CDC *MemDC = GetDC(); |
| | | |
| | | nOffSetMode = bUse; |
| | | nCamIndex = nCamidx; |
| | | nCamSacnIndex = nScanidx; |
| | | |
| | | if (bUse == TRUE) |
| | | { |
| | | DrawDefect(MemDC); |
| | | DrawReviewDefect(MemDC); |
| | | //DrawWsiDefect(&MemDC); |
| | | } |
| | | |
| | | nOffSetMode = FALSE; |
| | | nCamIndex = -1; |
| | | nCamSacnIndex = -1; |
| | | |
| | | //Invalidate(TRUE); |
| | | } |
| | | |
| | | void CDefectMap::OnPaint() |
| | |
| | | return 3; |
| | | } |
| | | break; |
| | | |
| | | //변경 필요 |
| | | case DefectType_Judge: |
| | | if (defectFilter.bJudgeOK && (pDefectResult->nJudgeType == DEFECT_JUDGE_CPJT_OK)) |
| | | { |
| | |
| | | if (defectFilter.bJudgePR && (pDefectResult->nJudgeType == DEFECT_JUDGE_CPJT_PR)) |
| | | { |
| | | return 2; |
| | | } |
| | | |
| | | if (defectFilter.bJudgeND && (pDefectResult->nJudgeType == DEFECT_JUDGE_CPJT_ND)) |
| | | { |
| | | return 3; |
| | | } |
| | | break; |
| | | |
| | |
| | | { |
| | | return 2; |
| | | } |
| | | |
| | | if (defectFilter.bJudgeND) |
| | | { |
| | | return 3; |
| | | } |
| | | break; |
| | | |
| | | case DefectType_Process: |
| | |
| | | continue; |
| | | } |
| | | |
| | | pOldPen = pDC->SelectObject(&m_pDefectPen[nColorIdx]); |
| | | pDC->SelectStockObject(BLACK_PEN); |
| | | pOldBrush = pDC->SelectObject(&m_pDefectBrush[nColorIdx]); |
| | | if (nOffSetMode == TRUE) |
| | | { |
| | | if (pDefectResult->nAOICameraIdx == nCamIndex && pDefectResult->nAOIScanIdx == nCamSacnIndex) |
| | | { |
| | | pOldPen = pDC->SelectObject(&m_pDefectPen[5]); |
| | | //pDC->SelectStockObject(BLACK_PEN); |
| | | pOldBrush = pDC->SelectObject(&m_pDefectBrush[5]); |
| | | } |
| | | else |
| | | { |
| | | pOldPen = pDC->SelectObject(&m_pDefectPen[5]); |
| | | pDC->SelectStockObject(BLACK_PEN); |
| | | pOldBrush = pDC->SelectObject(&m_pDefectBrush[5]); |
| | | pDC->SelectStockObject(BLACK_BRUSH); |
| | | } |
| | | |
| | | } |
| | | |
| | | else |
| | | { |
| | | pOldPen = pDC->SelectObject(&m_pDefectPen[nColorIdx]); |
| | | pDC->SelectStockObject(BLACK_PEN); |
| | | pOldBrush = pDC->SelectObject(&m_pDefectBrush[nColorIdx]); |
| | | } |
| | | |
| | | nPosX = pDefectResult->nUMOriginX; |
| | | nPosY = pDefectResult->nUMOriginY; |
| | | TransformGlass2Map(nPosX, nPosY); |
| | | |
| | | |
| | | |
| | | pDC->Rectangle(nPosX - m_nDefectSize, nPosY - m_nDefectSize, nPosX + m_nDefectSize, nPosY + m_nDefectSize); |
| | | } |
| | |
| | | |
| | | for(constVectorSReviewResultIt its=pReviewResult->m_vecSReviewResult.begin(); its!=pReviewResult->m_vecSReviewResult.end();its++) |
| | | { |
| | | if(its->nResultCode > ReviewResult_Process_Fail) |
| | | if (nOffSetMode == TRUE) |
| | | { |
| | | if (its->nAOICameraIdx == nCamIndex && its->nAOIScanIdx == nCamSacnIndex) |
| | | { |
| | | pOldPen = pDC->SelectObject(&m_pDefectPen[5]); |
| | | //pDC->SelectStockObject(BLACK_PEN); |
| | | pOldBrush = pDC->SelectObject(&m_pDefectBrush[5]); |
| | | //pDC->SelectStockObject(BLACK_BRUSH); |
| | | } |
| | | else |
| | | { |
| | | pOldPen = pDC->SelectObject(&m_pDefectPen[5]); |
| | | pDC->SelectStockObject(BLACK_PEN); |
| | | pOldBrush = pDC->SelectObject(&m_pDefectBrush[5]); |
| | | pDC->SelectStockObject(BLACK_BRUSH); |
| | | } |
| | | |
| | | } |
| | | else if(its->nResultCode > ReviewResult_Process_Fail) |
| | | { |
| | | pOldPen = pDC->SelectObject(&reviewedPen); |
| | | pOldBrush = pDC->SelectObject(&reviewedBrush); |