Repository navigation
Pdf backend#8644
Conversation
|
|
||
| orig_alphas = getattr(gc, '_effective_alphas', (1.0, 1.0)) | ||
| if gc.get_rgb() is None: | ||
| gc.set_foreground([0.0, 0.0, 0.0, 1.0]) |
There was a problem hiding this comment.
Why black? This should probably have 0 alpha?
There was a problem hiding this comment.
I'm not entirely sure what the alpha value has to do. I simply revert the unwanted behavior of #5596 i.e. in the function Line2D.draw(renderer), with the above setting, prior to the the change-set, at line 830, edgecolor (returned by Line2D.get_markeredgecolor())would be 'k', and after the call gc.set_foreground(edgecolor) on line 835, gc._rgb takes the value that I set. Will put a test case tomorrow to check to be sure that I did not miss anything.
|
Can you add a test? How to the png and pdf look with this change? |
|
Note: I'm having a bit of difficulty comparing PDF image to png image, so I might modify your compare_image function and include it in the PR to make this process easier later too. |
|
Sorry, I meant to just look at them, not to progamtically compare them! |
PR Summary
Small pull request to address #8142. The issue seems to propagate from a feature enhancement #5596 where
Line2D.get_markeredgecolor()returnsNonedue to the change-set. The fix simply check ifgc._rgb == Nonein backendpdf (caused the said change-set), if so, setgc._rgbto be the value it would have taken if the change-set was not there (pre #5596 behavior). Hence, this can probably be viewed as an addition to #5596 where behaviour of backendpdf remains the same .PR Checklist