comparison Core/Images/ImageProcessing.cpp @ 3259:6f9398eb902d

unit test Toolbox.SubstituteVariables
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 18 Feb 2019 20:42:21 +0100
parents 6f652c7bfc85
children 59a184cbb596
comparison
equal deleted inserted replaced
3258:6f652c7bfc85 3259:6f9398eb902d
1420 double y = (double)pixelY; 1420 double y = (double)pixelY;
1421 // Build a list of nodes. 1421 // Build a list of nodes.
1422 nodes = 0; 1422 nodes = 0;
1423 j = static_cast<int>(cpSize) - 1; 1423 j = static_cast<int>(cpSize) - 1;
1424 1424
1425 for (i = 0; i < cpSize; i++) 1425 for (i = 0; i < static_cast<int>(cpSize); i++)
1426 { 1426 {
1427 if ((cpy[i] < y && cpy[j] >= y) || (cpy[j] < y && cpy[i] >= y)) 1427 if ((cpy[i] < y && cpy[j] >= y) || (cpy[j] < y && cpy[i] >= y))
1428 { 1428 {
1429 nodeX[nodes++] = (int32_t)(cpx[i] + (y - cpy[i])/(cpy[j] - cpy[i]) * (cpx[j] - cpx[i])); 1429 nodeX[nodes++] = (int32_t)(cpx[i] + (y - cpy[i])/(cpy[j] - cpy[i]) * (cpx[j] - cpx[i]));
1430 } 1430 }