{"action":"opened","issue":{"url":"https://api.github.com/repos/CindyJS/CindyJS/issues/56","labels_url":"https://api.github.com/repos/CindyJS/CindyJS/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/CindyJS/CindyJS/issues/56/comments","events_url":"https://api.github.com/repos/CindyJS/CindyJS/issues/56/events","html_url":"https://github.com/CindyJS/CindyJS/issues/56","id":114065936,"number":56,"title":"Clip lines through infinity to canvas","user":{"login":"gagern","id":190759,"avatar_url":"https://avatars.githubusercontent.com/u/190759?v=3","gravatar_id":"","url":"https://api.github.com/users/gagern","html_url":"https://github.com/gagern","followers_url":"https://api.github.com/users/gagern/followers","following_url":"https://api.github.com/users/gagern/following{/other_user}","gists_url":"https://api.github.com/users/gagern/gists{/gist_id}","starred_url":"https://api.github.com/users/gagern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gagern/subscriptions","organizations_url":"https://api.github.com/users/gagern/orgs","repos_url":"https://api.github.com/users/gagern/repos","events_url":"https://api.github.com/users/gagern/events{/privacy}","received_events_url":"https://api.github.com/users/gagern/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CindyJS/CindyJS/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-29T14:48:58Z","updated_at":"2015-10-29T14:48:58Z","closed_at":null,"body":"Currently, [lines](https://github.com/CindyJS/CindyJS/blob/e7a5496832a21db46741c9e7926b2f8478595e92/src/js/libcs/Render2D.js#L451-L479) and [rays](https://github.com/CindyJS/CindyJS/blob/e7a5496832a21db46741c9e7926b2f8478595e92/src/js/libcs/OpDrawing.js#L253-L275) through infinity have some pretty arbitrary extent when rendering. The former has its size determined in user coordinates, while the latter uses pixel coordinates. Both may fail for exotic zoom levels or canvas sizes. It would be more appropriate to clip things to the size of the canvas, extended by width of the line."}}