Fix rect drawing with celiagg#317
Conversation
Component borders were a bit fuzzy when drawn with celiagg thanks to a very specific optimization which was made in the kiva agg backend. This replicates that in the celiagg backend as well.
|
This was mentioned by a user in celiagg/celiagg#43 |
Codecov Report
@@ Coverage Diff @@
## master #317 +/- ##
==========================================
- Coverage 33.69% 32.91% -0.78%
==========================================
Files 206 206
Lines 18305 18303 -2
Branches 2411 2415 +4
==========================================
- Hits 6167 6024 -143
- Misses 11747 11893 +146
+ Partials 391 386 -5
Continue to review full report at Codecov.
|
|
Hmmm... Chaco also does a half-pixel adjustment here https://github.com/enthought/chaco/blob/master/chaco/plot_graphics_context.py#L28 but I don't know that we get that class unless we specifically ask for it. I don't like the ad-hoc half-pixel shifts. Not saying that we shouldn't do it to keep backwards consistency, but it bugs me. Beyond that the code LGTM. |
| if (not self.canvas_state.anti_aliased and | ||
| self.canvas_state.line_width in (0.0, 1.0) and | ||
| fabs(self.transform.shx) < 1e-3 and | ||
| fabs(self.transform.shx) < 1e-3): |
There was a problem hiding this comment.
Typo: One of these should be self.transform.shy
|
I'm happy for this to be merged with the typo corrected. |
corranwebster
left a comment
There was a problem hiding this comment.
Fixed typo. OK with this since it replicates current behaviour.
Component borders were a bit fuzzy when drawn with celiagg thanks to a very specific optimization which was made in the kiva agg backend.
This replicates that in the celiagg backend as well.