Repository navigation
Fix #5895: Properly clip MOVETO commands - #5911
Conversation
|
Travis failed with lots of small differences. |
|
This is passing Travis now and ready for final review. |
There was a problem hiding this comment.
what does this line do? My attempts to understand this by writing code have not gone well
// switch_statement1.cpp
#include <iostream>
enum test_e
{
A, B, C
};
void helper(test_e inp)
{
switch (inp)
{
case (A | B):
std::cout<< "One"<< std::endl;
break;
case C:
std::cout<< "Three"<< std::endl;
break;
default:
std::cout<< "NONE?!"<< std::endl;
}
}
int main() {
helper(A);
helper(B);
helper(C);
}
gives
22:07 $ ./a.out
NONE?!
One
Three
There was a problem hiding this comment.
with some digging I now see that this filtering with two things that just look like they are members of the same enum set.
There was a problem hiding this comment.
The value agg::path_cmd_end_poly | agg::path_flags_close is how Agg indicates the end of a path that is also closed. Why that's not a single enum value, I don't know, but that's how it's done in Agg so we must follow. If it makes the code clearer I could create a new alias:
end_and_close_poly = agg::path_cmd_end_poly | agg::path_flags_close
There was a problem hiding this comment.
Nah, I am just on a wading-into-c-code-I-do-not-understand kick the last few days.
Fix #5895: Properly clip MOVETO commands
Fix #5895: Properly clip MOVETO commands Conflicts: lib/matplotlib/tests/baseline_images/test_axes/log_scales.svg kept master version of file
|
back ported as 512c8d0 |
Fix matplotlib#5895: Properly clip MOVETO commands Conflicts: lib/matplotlib/tests/baseline_images/test_axes/log_scales.svg kept master version of file
I haven't run the tests on this yet... we'll see what Travis CI thinks.