Skip to content
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

Offset ticks and domain path by a half-pixel? #8

Closed
mbostock opened this issue May 8, 2016 · 1 comment
Closed

Offset ticks and domain path by a half-pixel? #8

mbostock opened this issue May 8, 2016 · 1 comment
Assignees

Comments

@mbostock
Copy link
Member

mbostock commented May 8, 2016

Safari often botches shape-rendering: crispEdges, drawing a two-pixel-wide line even though the stroke-width is one pixel. Also, in the common case where the coordinates are rounded, using a half-pixel offset should produce crisp edges even without shape-rendering.

I think we should use zero-based indexing for coordinates, such that y = 0 means the topmost pixel and x = 0 means the leftmost pixel, and therefore offsetting by +0.5 (not -0.5) in both x and y.

@mbostock mbostock self-assigned this May 8, 2016
@curran
Copy link
Contributor

curran commented May 8, 2016

I have also noticed this behavior and been frustrated by it. I appreciate that you're working on this. Sounds like a great solution to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants