-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change default linejoin and linecap to preserve previous behavior #62
Conversation
FYI the failing appveyor is a problem with |
It looks like the line_cap line still needs to be changed to revert to the previous behaviour. Otherwise, this looks good! The new docstrings are great. |
Sorry, I completely forgot about this. Should be complete. Will wait for tests. |
@a-hurst Any chance you're a powershell expert? The appveyor builds are failing because (I think) the |
@djhoese unfortunately not, I'm very much a UNIX person so I really had to fumble my way through setting up appveyor to get aggdraw builds working originally. That said, maybe it's worth a shot putting the "%CMD_IN_ENV%" in front of the "conda activate test" line, or alternatively putting the "call" in front of "conda activate test"? The only way I managed to get it working in the first place was a lot of trial and error. Edit: Also, just looked at the files changed in the pull request and noticed the new sum value for all the pixels in test_graphics2() in the selftest.py file (51200). Curious, I looked back at the original selftest.py from before the 2.4 pull request was merged and noticed it was 50800. Given that line joins/ends are now the same, it looks like that confirms my finding in #60 that shapes are being drawn slightly larger following the update. @dov, any idea what changes on the back end from agg 2.2 to 2.4 might have caused this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a comment on the ci-helpers
@a-hurst Now that this is merged we should see how different our various use cases are. I will try running some of the pytroll package tests (pycoast) with the master branch of aggdraw and see if/how many of our tests fail. |
Closes #61. This changes the default line join and cap types to miter and butt which preserves the previous Agg settings. @dov any idea/reason why these defaults were changed when switching to agg 2.4? Also, @a-hurst please review.
I got the mapping of the constants here since the main antigrain website seems broken. Using raw enum integers this way is not the most flexible or backwards compatible. However, mapping strings to the constants is not the most straight forward thing to do in C++ so I will wait until we migrate to cython to change this to accept ints (backwards compatible) or strings for the names of the join and cap types. I did realize that #3 was doing this string checking (FYI @ simonkolotov), but since it looks like the API in 2.4 changed quite a bit, I didn't really have time to adjust that PR to work for this. This at least preserves the current behavior.