{"url":"https://api.github.com/gists/3468167","forks_url":"https://api.github.com/gists/3468167/forks","commits_url":"https://api.github.com/gists/3468167/commits","id":"3468167","node_id":"MDQ6R2lzdDM0NjgxNjc=","git_pull_url":"https://gist.github.com/3468167.git","git_push_url":"https://gist.github.com/3468167.git","html_url":"https://gist.github.com/mbostock/3468167","files":{".block":{"filename":".block","type":"text/plain","language":null,"raw_url":"https://gist.githubusercontent.com/mbostock/3468167/raw/703d310b399098a243a76a50bc209167e924cfd2/.block","size":17,"truncated":false,"content":"license: gpl-3.0\n","encoding":"utf-8"},"README.md":{"filename":"README.md","type":"text/markdown","language":"Markdown","raw_url":"https://gist.githubusercontent.com/mbostock/3468167/raw/5b3b218aa29619ec7669d45964f5d5979e68aa09/README.md","size":213,"truncated":false,"content":"An answer to Stack Overflow question: [svg / d3.js rounded corner on one corner of a rectangle](http://stackoverflow.com/questions/12115691/svg-d3-js-rounded-corner-on-one-corner-of-a-rectangle/12124192#12124192).","encoding":"utf-8"},"index.html":{"filename":"index.html","type":"text/html","language":"HTML","raw_url":"https://gist.githubusercontent.com/mbostock/3468167/raw/7085e0c58d0e5489b8b513fbcf5d84d6f72f1660/index.html","size":1015,"truncated":false,"content":"<!DOCTYPE html>\n<meta charset=\"utf-8\">\n<style>\n\nbody {\n  margin: auto;\n  width: 960px;\n}\n\npath {\n  fill: #ccc;\n  stroke: #000;\n  stroke-width: 1.5px;\n}\n\n</style>\n<body>\n<script src=\"//d3js.org/d3.v3.min.js\"></script>\n<script>\n\nvar svg = d3.select(\"body\").append(\"svg\")\n    .attr(\"width\", 960)\n    .attr(\"height\", 500)\n  .append(\"g\")\n    .attr(\"transform\", \"translate(480,250)\");\n\nvar rect = svg.append(\"path\")\n    .attr(\"d\", rightRoundedRect(-240, -120, 480, 240, 20));\n\n// Returns path data for a rectangle with rounded right corners.\n// Note: it’s probably easier to use a <rect> element with rx and ry attributes!\n// The top-left corner is ⟨x,y⟩.\nfunction rightRoundedRect(x, y, width, height, radius) {\n  return \"M\" + x + \",\" + y\n       + \"h\" + (width - radius)\n       + \"a\" + radius + \",\" + radius + \" 0 0 1 \" + radius + \",\" + radius\n       + \"v\" + (height - 2 * radius)\n       + \"a\" + radius + \",\" + radius + \" 0 0 1 \" + -radius + \",\" + radius\n       + \"h\" + (radius - width)\n       + \"z\";\n}\n\n</script>\n","encoding":"utf-8"},"thumbnail.png":{"filename":"thumbnail.png","type":"image/png","language":null,"raw_url":"https://gist.githubusercontent.com/mbostock/3468167/raw/345add140e0e02a4866607eb763b27b0e45aeece/thumbnail.png","size":709,"truncated":false,"content":"iVBORw0KGgoAAAANSUhEUgAAAOYAAAB4CAYAAADmBo6IAAAAGXRFWHRTb2Z0\nd2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmdJREFUeNrs2Ttu4lAUgOFj\nhHlIQZGnGHZAh4So0tDSpckyqWki0qdlAVOkzUgzARQRQax4TNYwSvz4Puni\n+pj7C/uSFEXxKyJ+lus9gO+Wlut3t/zIyjVyP6Ay3jvuAVSPMEGYgDBBmIAw\nQZiAMEGYgDABYYIwAWGCMAFhgjABYQLCBGECwgRhAsIEYQLCBIQJwgSECcIE\nvkC3DUMej8c4HA6RJIlvvEaKooh+vx9ZlgmziVarVTw/P8dgMLDbaxZmnueR\npmksFouYz+fCbJKrq6uYTqfR6/Xs9hrGudvtYrPZxNPTU9zd3QmzSV/u+Xy2\ny2tqNBrF7e1trNfr2G63MZvNGj+zwx8q7+PjI06nU9zc3Hy+krSBMKlNnMPh\nMPb7vTChai6HQZdXE2FChbTlLy9hgjABYYIwAWGCMAFhgjABYQLCBGECwgRh\nAsIEYQLCBIQJwgSECcIEhAnCBIQJCBOECQgThAkIE4QJCBMQJggTECYIExAm\nCBMQJiBMECYgTBAmIEwQJiBMQJggTPjfiqIQJlRNt9uNJEmECZXYqJ1OvL29\nxfX1tV9MqEqU/X4/Hh8fYzwet+PJoA1DXh59er3e56J+75S73S7u7+9jMpnE\nbDYTZlO8vr7Gw8NDDAYDO71mUeZ5HmmaxnK5jPl83prZk3L4P+X1R5OHPB6P\ncTgcWnFo0LQwL4+wWZa1bfS/rQgT6hamwx+oIGGCMAFhgjABYYIwAWGCMAFh\nAsIEYQLCBGECwgRhAsIEhAnCBIQJwgSECcIEhAkIE4QJCBOECXyBbp7nL+U1\nLde72wHf7tLiyz8BBgA3xYHN912I/AAAAABJRU5ErkJggg==\n","encoding":"base64"}},"public":true,"created_at":"2012-08-25T17:24:32Z","updated_at":"2017-07-17T10:59:57Z","description":"Rounded Rectangle","comments":0,"user":null,"comments_enabled":true,"comments_url":"https://api.github.com/gists/3468167/comments","owner":{"login":"mbostock","id":230541,"node_id":"MDQ6VXNlcjIzMDU0MQ==","avatar_url":"https://avatars.githubusercontent.com/u/230541?v=4","gravatar_id":"","url":"https://api.github.com/users/mbostock","html_url":"https://github.com/mbostock","followers_url":"https://api.github.com/users/mbostock/followers","following_url":"https://api.github.com/users/mbostock/following{/other_user}","gists_url":"https://api.github.com/users/mbostock/gists{/gist_id}","starred_url":"https://api.github.com/users/mbostock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbostock/subscriptions","organizations_url":"https://api.github.com/users/mbostock/orgs","repos_url":"https://api.github.com/users/mbostock/repos","events_url":"https://api.github.com/users/mbostock/events{/privacy}","received_events_url":"https://api.github.com/users/mbostock/received_events","type":"User","user_view_type":"public","site_admin":false},"forks":[{"url":"https://api.github.com/gists/ad64ae955d029fe1b01e68b4569f7c8c","user":{"login":"vo-va","id":2452627,"node_id":"MDQ6VXNlcjI0NTI2Mjc=","avatar_url":"https://avatars.githubusercontent.com/u/2452627?v=4","gravatar_id":"","url":"https://api.github.com/users/vo-va","html_url":"https://github.com/vo-va","followers_url":"https://api.github.com/users/vo-va/followers","following_url":"https://api.github.com/users/vo-va/following{/other_user}","gists_url":"https://api.github.com/users/vo-va/gists{/gist_id}","starred_url":"https://api.github.com/users/vo-va/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vo-va/subscriptions","organizations_url":"https://api.github.com/users/vo-va/orgs","repos_url":"https://api.github.com/users/vo-va/repos","events_url":"https://api.github.com/users/vo-va/events{/privacy}","received_events_url":"https://api.github.com/users/vo-va/received_events","type":"User","user_view_type":"public","site_admin":false,"name":"Vladimir Platunov","company":null,"blog":"","location":null,"email":null,"hireable":true,"bio":null,"twitter_username":null,"public_repos":43,"public_gists":9,"followers":6,"following":6,"created_at":"2012-09-29T14:21:39Z","updated_at":"2026-04-03T23:57:46Z"},"id":"ad64ae955d029fe1b01e68b4569f7c8c","created_at":"2017-07-17T10:59:56Z","updated_at":"2017-07-17T10:59:57Z"}],"history":[{"user":{"login":"mbostock","id":230541,"node_id":"MDQ6VXNlcjIzMDU0MQ==","avatar_url":"https://avatars.githubusercontent.com/u/230541?v=4","gravatar_id":"","url":"https://api.github.com/users/mbostock","html_url":"https://github.com/mbostock","followers_url":"https://api.github.com/users/mbostock/followers","following_url":"https://api.github.com/users/mbostock/following{/other_user}","gists_url":"https://api.github.com/users/mbostock/gists{/gist_id}","starred_url":"https://api.github.com/users/mbostock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbostock/subscriptions","organizations_url":"https://api.github.com/users/mbostock/orgs","repos_url":"https://api.github.com/users/mbostock/repos","events_url":"https://api.github.com/users/mbostock/events{/privacy}","received_events_url":"https://api.github.com/users/mbostock/received_events","type":"User","user_view_type":"public","site_admin":false},"version":"e18d75d6686284d8ec13157b29ed293d502e9dcf","committed_at":"2016-02-09T01:33:21Z","change_status":{"total":1,"additions":1,"deletions":0},"url":"https://api.github.com/gists/3468167/e18d75d6686284d8ec13157b29ed293d502e9dcf"},{"user":{"login":"mbostock","id":230541,"node_id":"MDQ6VXNlcjIzMDU0MQ==","avatar_url":"https://avatars.githubusercontent.com/u/230541?v=4","gravatar_id":"","url":"https://api.github.com/users/mbostock","html_url":"https://github.com/mbostock","followers_url":"https://api.github.com/users/mbostock/followers","following_url":"https://api.github.com/users/mbostock/following{/other_user}","gists_url":"https://api.github.com/users/mbostock/gists{/gist_id}","starred_url":"https://api.github.com/users/mbostock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbostock/subscriptions","organizations_url":"https://api.github.com/users/mbostock/orgs","repos_url":"https://api.github.com/users/mbostock/repos","events_url":"https://api.github.com/users/mbostock/events{/privacy}","received_events_url":"https://api.github.com/users/mbostock/received_events","type":"User","user_view_type":"public","site_admin":false},"version":"478c21a24a6de300d81c7a177d55fb60cc46b766","committed_at":"2015-10-31T00:58:25Z","change_status":{"total":2,"additions":1,"deletions":1},"url":"https://api.github.com/gists/3468167/478c21a24a6de300d81c7a177d55fb60cc46b766"},{"user":{"login":"mbostock","id":230541,"node_id":"MDQ6VXNlcjIzMDU0MQ==","avatar_url":"https://avatars.githubusercontent.com/u/230541?v=4","gravatar_id":"","url":"https://api.github.com/users/mbostock","html_url":"https://github.com/mbostock","followers_url":"https://api.github.com/users/mbostock/followers","following_url":"https://api.github.com/users/mbostock/following{/other_user}","gists_url":"https://api.github.com/users/mbostock/gists{/gist_id}","starred_url":"https://api.github.com/users/mbostock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbostock/subscriptions","organizations_url":"https://api.github.com/users/mbostock/orgs","repos_url":"https://api.github.com/users/mbostock/repos","events_url":"https://api.github.com/users/mbostock/events{/privacy}","received_events_url":"https://api.github.com/users/mbostock/received_events","type":"User","user_view_type":"public","site_admin":false},"version":"1a725a6a6cd5baf899e30ab7fa06cfc74f4bf44b","committed_at":"2015-06-11T17:04:53Z","change_status":{"total":3,"additions":2,"deletions":1},"url":"https://api.github.com/gists/3468167/1a725a6a6cd5baf899e30ab7fa06cfc74f4bf44b"},{"user":{"login":"mbostock","id":230541,"node_id":"MDQ6VXNlcjIzMDU0MQ==","avatar_url":"https://avatars.githubusercontent.com/u/230541?v=4","gravatar_id":"","url":"https://api.github.com/users/mbostock","html_url":"https://github.com/mbostock","followers_url":"https://api.github.com/users/mbostock/followers","following_url":"https://api.github.com/users/mbostock/following{/other_user}","gists_url":"https://api.github.com/users/mbostock/gists{/gist_id}","starred_url":"https://api.github.com/users/mbostock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbostock/subscriptions","organizations_url":"https://api.github.com/users/mbostock/orgs","repos_url":"https://api.github.com/users/mbostock/repos","events_url":"https://api.github.com/users/mbostock/events{/privacy}","received_events_url":"https://api.github.com/users/mbostock/received_events","type":"User","user_view_type":"public","site_admin":false},"version":"1aed704a9fae4abfce44dc7840ad8b4bcc3d37aa","committed_at":"2012-10-12T03:57:02Z","change_status":{"total":0,"additions":0,"deletions":0},"url":"https://api.github.com/gists/3468167/1aed704a9fae4abfce44dc7840ad8b4bcc3d37aa"},{"user":{"login":"mbostock","id":230541,"node_id":"MDQ6VXNlcjIzMDU0MQ==","avatar_url":"https://avatars.githubusercontent.com/u/230541?v=4","gravatar_id":"","url":"https://api.github.com/users/mbostock","html_url":"https://github.com/mbostock","followers_url":"https://api.github.com/users/mbostock/followers","following_url":"https://api.github.com/users/mbostock/following{/other_user}","gists_url":"https://api.github.com/users/mbostock/gists{/gist_id}","starred_url":"https://api.github.com/users/mbostock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbostock/subscriptions","organizations_url":"https://api.github.com/users/mbostock/orgs","repos_url":"https://api.github.com/users/mbostock/repos","events_url":"https://api.github.com/users/mbostock/events{/privacy}","received_events_url":"https://api.github.com/users/mbostock/received_events","type":"User","user_view_type":"public","site_admin":false},"version":"3f181f1226620162eb50492748d42cd1f7894d46","committed_at":"2012-08-25T17:33:34Z","change_status":{"total":1,"additions":1,"deletions":0},"url":"https://api.github.com/gists/3468167/3f181f1226620162eb50492748d42cd1f7894d46"},{"user":{"login":"mbostock","id":230541,"node_id":"MDQ6VXNlcjIzMDU0MQ==","avatar_url":"https://avatars.githubusercontent.com/u/230541?v=4","gravatar_id":"","url":"https://api.github.com/users/mbostock","html_url":"https://github.com/mbostock","followers_url":"https://api.github.com/users/mbostock/followers","following_url":"https://api.github.com/users/mbostock/following{/other_user}","gists_url":"https://api.github.com/users/mbostock/gists{/gist_id}","starred_url":"https://api.github.com/users/mbostock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbostock/subscriptions","organizations_url":"https://api.github.com/users/mbostock/orgs","repos_url":"https://api.github.com/users/mbostock/repos","events_url":"https://api.github.com/users/mbostock/events{/privacy}","received_events_url":"https://api.github.com/users/mbostock/received_events","type":"User","user_view_type":"public","site_admin":false},"version":"a07c83b1af4bff84c72383b11151be2a7c12b474","committed_at":"2012-08-25T17:24:32Z","change_status":{"total":42,"additions":42,"deletions":0},"url":"https://api.github.com/gists/3468167/a07c83b1af4bff84c72383b11151be2a7c12b474"}],"truncated":false}