Open daviddoria opened 13 years ago
it makes as many 2x2 blocks in the upper left as it can and then makes some 2x3 or 3x3 blocks around the right and bottom edges, then a 3x3 in the bottom corner (if it is odd x odd)
For 5x5, you get one 2x2 block in the upper left one 3x2 block in the upper right one 2x3 block in the lower left and one 3x3 block in the lower right
At line 40 in Label.cpp:
const bool widthIsOdd = (width & 1) == 1;
Is there a reason for the, what I'll call, cryptic notation? Is this at a critical point in the code? Or could it be changed to, for readability:
bool widthIsOdd; if(width & 1 == 1) // width is odd { widthIsOdd = true; } else { widthIsOdd = false; }
and then
outIncludeOddEdgeAtX = widthIsOdd ? (width - 3) : -1;
to
if(widthIsOdd) { outIncludeOddEdgeAtX = height-3; } else { outIncludeOddEdgeAtX = -1; }
?
I guess I also don't follow the name of GetCoordinatesToIncludeOddEdge - like what is a "Coordinate to include odd edge"?
In Label.cpp, this function as some 3's, 1's, and -1's that should be commented.