{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/node-canvas/issues/811","repository_url":"https://api.github.com/repos/Automattic/node-canvas","labels_url":"https://api.github.com/repos/Automattic/node-canvas/issues/811/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/node-canvas/issues/811/comments","events_url":"https://api.github.com/repos/Automattic/node-canvas/issues/811/events","html_url":"https://github.com/Automattic/node-canvas/pull/811","id":176284715,"number":811,"title":"Render SVG img elements when librsvg is available","user":{"login":"foysavas","id":1735,"avatar_url":"https://avatars.githubusercontent.com/u/1735?v=3","gravatar_id":"","url":"https://api.github.com/users/foysavas","html_url":"https://github.com/foysavas","followers_url":"https://api.github.com/users/foysavas/followers","following_url":"https://api.github.com/users/foysavas/following{/other_user}","gists_url":"https://api.github.com/users/foysavas/gists{/gist_id}","starred_url":"https://api.github.com/users/foysavas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foysavas/subscriptions","organizations_url":"https://api.github.com/users/foysavas/orgs","repos_url":"https://api.github.com/users/foysavas/repos","events_url":"https://api.github.com/users/foysavas/events{/privacy}","received_events_url":"https://api.github.com/users/foysavas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-09-12T02:53:15Z","updated_at":"2016-10-30T18:49:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Automattic/node-canvas/pulls/811","html_url":"https://github.com/Automattic/node-canvas/pull/811","diff_url":"https://github.com/Automattic/node-canvas/pull/811.diff","patch_url":"https://github.com/Automattic/node-canvas/pull/811.patch"},"body":"In the browser, canvas can render SVG img elements.\r\n\r\nThis commit enables node-canvas to do the same, if librsvg is installed.\r\nNote that librsvg remains an optional dependency.\r\n\r\nUse cases for embedded SVG images include the rendering of d3 charts,\r\nwhich often blend SVG and canvas content.\r\n\r\nBig thanks to petarov and scott113341 for much of the original code."},"comment":{"url":"https://api.github.com/repos/Automattic/node-canvas/issues/comments/257170140","html_url":"https://github.com/Automattic/node-canvas/pull/811#issuecomment-257170140","issue_url":"https://api.github.com/repos/Automattic/node-canvas/issues/811","id":257170140,"user":{"login":"LinusU","id":189580,"avatar_url":"https://avatars.githubusercontent.com/u/189580?v=3","gravatar_id":"","url":"https://api.github.com/users/LinusU","html_url":"https://github.com/LinusU","followers_url":"https://api.github.com/users/LinusU/followers","following_url":"https://api.github.com/users/LinusU/following{/other_user}","gists_url":"https://api.github.com/users/LinusU/gists{/gist_id}","starred_url":"https://api.github.com/users/LinusU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LinusU/subscriptions","organizations_url":"https://api.github.com/users/LinusU/orgs","repos_url":"https://api.github.com/users/LinusU/repos","events_url":"https://api.github.com/users/LinusU/events{/privacy}","received_events_url":"https://api.github.com/users/LinusU/received_events","type":"User","site_admin":false},"created_at":"2016-10-30T18:49:05Z","updated_at":"2016-10-30T18:49:05Z","body":"Hmm, looking at the code in this pull request it seems like it's rasterizing the svg as soon as it's loaded.\r\n\r\n@foysavas Do you think it would be possible to store the loaded svg as an `RsvgHandle` and then using `rsvg_handle_render_cairo` only when the image is to be drawn to a canvas?"}}
{"actor":{"display_login":"LinusU"}}