| 419 | pWnd->ReleaseDC (dc); |
| 420 | } |
| 421 | void CMatchToolDlg::DrawDashLine (Mat& matDraw, Point ptStart, Point ptEnd, Scalar color1, Scalar color2) |
| 422 | { |
| 423 | LineIterator itLine (matDraw, ptStart, ptEnd, 8, 0); |
| 424 | int iCount = itLine.count; |
| 425 | bool bOdd = false; |
| 426 | for (int i = 0; i < iCount; i+=1, itLine++) |
| 427 | { |
| 428 | if (i % 3 == 0) |
| 429 | { |
| 430 | //白色BGR |
| 431 | (*itLine)[0] = (uchar)color2.val[0]; |
| 432 | (*itLine)[1] = (uchar)color2.val[1]; |
| 433 | (*itLine)[2] = (uchar)color2.val[2]; |
| 434 | } |
| 435 | else |
| 436 | { |
| 437 | //紅色BGR |
| 438 | (*itLine)[0] = (uchar)color1.val[0]; |
| 439 | (*itLine)[1] = (uchar)color1.val[1]; |
| 440 | (*itLine)[2] = (uchar)color1.val[2]; |
| 441 | } |
| 442 | |
| 443 | } |
| 444 | } |
| 445 | void CMatchToolDlg::DrawMarkCross (Mat& matDraw, int iX, int iY, int iLength, Scalar color, int iThickness) |
| 446 | { |
| 447 | if (matDraw.empty ()) |
nothing calls this directly
no outgoing calls
no test coverage detected