{"action":"closed","issue":{"url":"https://api.github.com/repos/Ede123/test/issues/27","repository_url":"https://api.github.com/repos/Ede123/test","labels_url":"https://api.github.com/repos/Ede123/test/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/Ede123/test/issues/27/comments","events_url":"https://api.github.com/repos/Ede123/test/issues/27/events","html_url":"https://github.com/Ede123/test/issues/27","id":173666981,"number":27,"title":"Convert polylines and polygons into paths","user":{"login":"launchpad-issue-importer","id":21296533,"avatar_url":"https://avatars.githubusercontent.com/u/21296533?v=3","gravatar_id":"","url":"https://api.github.com/users/launchpad-issue-importer","html_url":"https://github.com/launchpad-issue-importer","followers_url":"https://api.github.com/users/launchpad-issue-importer/followers","following_url":"https://api.github.com/users/launchpad-issue-importer/following{/other_user}","gists_url":"https://api.github.com/users/launchpad-issue-importer/gists{/gist_id}","starred_url":"https://api.github.com/users/launchpad-issue-importer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/launchpad-issue-importer/subscriptions","organizations_url":"https://api.github.com/users/launchpad-issue-importer/orgs","repos_url":"https://api.github.com/users/launchpad-issue-importer/repos","events_url":"https://api.github.com/users/launchpad-issue-importer/events{/privacy}","received_events_url":"https://api.github.com/users/launchpad-issue-importer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-28T20:50:34Z","updated_at":"2016-08-28T20:56:43Z","closed_at":"2016-08-28T20:56:43Z","body":"Polylines and polygons are defined in the SVG specification as being alternate forms for paths starting with an absolute move to the first point and linetos to each of the following points. In the case of polygon, a closepath is also added.\n\nA naive reading of this feature request would just convert \"polyline points=...\" into \"path d=M...\" and \"polygon points=...\" into \"path d=M...Z\", but the real savings is had from:\n\n* vertical and horizontal line segments;\n* short line segments enabling shorter relative linetos.\n\nConsider this polygon, from a test case in https://bugs.launchpad.net/scour/+bug/481605/comments/3 :\n\n<polygon fill-rule=\"evenodd\" clip-rule=\"evenodd\" fill=\"#993300\" points=\"370.441,402.976 371.967,403.015 374.941,403.343 \n\n\t377.819,403.942 380.601,404.831 383.247,405.989 385.758,407.419 388.113,409.042 390.335,410.916 392.344,413.02 394.141,415.26 ...\" />\n\nA naive conversion would just do this:\n\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" fill=\"#993300\" d=\"M370.441 402.976 371.967 403.015 374.941 403.343 377.819 403.942 380.601 404.831 383.247 405.989 385.758 407.419 388.113 409.042 390.335 410.916 392.344 413.02 394.141 415.26 ... Z\" />\n\nA real conversion would be done before paths, and thus allow the new path to be converted as well:\n\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" fill=\"#993300\" d=\"m370.441 402.976 1.526.039 2.974.328 2.878.599 2.782.889 2.646 1.158 2.511 1.43 2.355 1.623 2.222 1.874 2.009 2.104 1.797 2.24 ... Z\" />\n\nwhich is clearly shorter."}}
{"actor":{"display_login":"Ede123"}}