{"action":"created","issue":{"url":"https://api.github.com/repos/vega/vega-scenegraph/issues/36","repository_url":"https://api.github.com/repos/vega/vega-scenegraph","labels_url":"https://api.github.com/repos/vega/vega-scenegraph/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/vega/vega-scenegraph/issues/36/comments","events_url":"https://api.github.com/repos/vega/vega-scenegraph/issues/36/events","html_url":"https://github.com/vega/vega-scenegraph/issues/36","id":201730825,"number":36,"title":"Allow anti-aliasing to be turned off on a per-mark basis","user":{"login":"besquared","id":8779,"avatar_url":"https://avatars0.githubusercontent.com/u/8779?v=3","gravatar_id":"","url":"https://api.github.com/users/besquared","html_url":"https://github.com/besquared","followers_url":"https://api.github.com/users/besquared/followers","following_url":"https://api.github.com/users/besquared/following{/other_user}","gists_url":"https://api.github.com/users/besquared/gists{/gist_id}","starred_url":"https://api.github.com/users/besquared/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/besquared/subscriptions","organizations_url":"https://api.github.com/users/besquared/orgs","repos_url":"https://api.github.com/users/besquared/repos","events_url":"https://api.github.com/users/besquared/events{/privacy}","received_events_url":"https://api.github.com/users/besquared/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-01-19T00:21:59Z","updated_at":"2017-05-10T16:51:54Z","closed_at":"2017-05-10T16:51:54Z","body":"By default paths in SVG and Canvas are smoothed which creates soft/smoothed edges on everything. There are times when it creates a better presentation to turn off the anti-aliasing on a per-mark basis.\r\n\r\nFor SVG that means adding a style to the mark element such as\r\n\r\n```\r\nstyle=\"shape-rendering:crispEdges\"\r\n```\r\n\r\nFor canvas the best way to do this is probably using a sub-pixel translation as described here:\r\n\r\nhttp://www.mobtowers.com/html5-canvas-crisp-lines-every-time/\r\n\r\nYou can store a variable that translates and then translates back when necessary. I'll admit I'm not too familiar with the scenegraph so don't know how possible this particular approach it."},"comment":{"url":"https://api.github.com/repos/vega/vega-scenegraph/issues/comments/300544668","html_url":"https://github.com/vega/vega-scenegraph/issues/36#issuecomment-300544668","issue_url":"https://api.github.com/repos/vega/vega-scenegraph/issues/36","id":300544668,"user":{"login":"jheer","id":202799,"avatar_url":"https://avatars3.githubusercontent.com/u/202799?v=3","gravatar_id":"","url":"https://api.github.com/users/jheer","html_url":"https://github.com/jheer","followers_url":"https://api.github.com/users/jheer/followers","following_url":"https://api.github.com/users/jheer/following{/other_user}","gists_url":"https://api.github.com/users/jheer/gists{/gist_id}","starred_url":"https://api.github.com/users/jheer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jheer/subscriptions","organizations_url":"https://api.github.com/users/jheer/orgs","repos_url":"https://api.github.com/users/jheer/repos","events_url":"https://api.github.com/users/jheer/events{/privacy}","received_events_url":"https://api.github.com/users/jheer/received_events","type":"User","site_admin":false},"created_at":"2017-05-10T16:51:54Z","updated_at":"2017-05-10T16:51:54Z","body":"Thanks for raising the issue. As you note, you can use sub-pixel offsets directly in a Vega spec and this passed through to the scenegraph. Alternatively, for SVG you are free to include an external CSS file to modify the rendering parameters. A related option is the use of `round: true` on scale mappings to force coordinates to the pixel grid. I'm closing the issue for now."}}
{"actor":{"display_login":"jheer"}}