{"action":"created","issue":{"url":"https://api.github.com/repos/cparnot/ASCIImage/issues/2","labels_url":"https://api.github.com/repos/cparnot/ASCIImage/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/cparnot/ASCIImage/issues/2/comments","events_url":"https://api.github.com/repos/cparnot/ASCIImage/issues/2/events","html_url":"https://github.com/cparnot/ASCIImage/issues/2","id":63834006,"number":2,"title":"Implementation-independent context/path metadata?","user":{"login":"Oblomov","id":1464,"avatar_url":"https://avatars.githubusercontent.com/u/1464?v=3","gravatar_id":"","url":"https://api.github.com/users/Oblomov","html_url":"https://github.com/Oblomov","followers_url":"https://api.github.com/users/Oblomov/followers","following_url":"https://api.github.com/users/Oblomov/following{/other_user}","gists_url":"https://api.github.com/users/Oblomov/gists{/gist_id}","starred_url":"https://api.github.com/users/Oblomov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Oblomov/subscriptions","organizations_url":"https://api.github.com/users/Oblomov/orgs","repos_url":"https://api.github.com/users/Oblomov/repos","events_url":"https://api.github.com/users/Oblomov/events{/privacy}","received_events_url":"https://api.github.com/users/Oblomov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2015-03-23T21:13:41Z","updated_at":"2015-04-09T05:47:18Z","closed_at":null,"body":"The aim of this issue is to get the discussion started on a point that, I think we all agree, would be pretty useful: finding some implementation-independent method to define context/path metadata (i.e. both default and per-path overrides of fill color, stroke color and stroke width, aliasing/anti-aliasing, and open/closed path choices).\r\n\r\nA possibility would be a JSON or YAML snippet holding a simple map having keys `default`, `element0`, ... `elementN` (or something similar), and with values maps of the properties to their values.\r\n\r\nThis does have the downside that more sophisticated selections (e.g. \"if index is less than 2 or higher than 16\") are not possible; a solution would be to allow keys in the hash to be arrays or ranges or something similar.\r\n"},"comment":{"url":"https://api.github.com/repos/cparnot/ASCIImage/issues/comments/91121717","html_url":"https://github.com/cparnot/ASCIImage/issues/2#issuecomment-91121717","issue_url":"https://api.github.com/repos/cparnot/ASCIImage/issues/2","id":91121717,"user":{"login":"flopp","id":272596,"avatar_url":"https://avatars.githubusercontent.com/u/272596?v=3","gravatar_id":"","url":"https://api.github.com/users/flopp","html_url":"https://github.com/flopp","followers_url":"https://api.github.com/users/flopp/followers","following_url":"https://api.github.com/users/flopp/following{/other_user}","gists_url":"https://api.github.com/users/flopp/gists{/gist_id}","starred_url":"https://api.github.com/users/flopp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flopp/subscriptions","organizations_url":"https://api.github.com/users/flopp/orgs","repos_url":"https://api.github.com/users/flopp/repos","events_url":"https://api.github.com/users/flopp/events{/privacy}","received_events_url":"https://api.github.com/users/flopp/received_events","type":"User","site_admin":false},"created_at":"2015-04-09T05:47:18Z","updated_at":"2015-04-09T05:47:18Z","body":"What I find confusing about the discussed formats, is the 0-based indexing of the individual style rules (style 0 corresponds to image's first shape, style 1 to the second shap, and so on). This makes it visually difficult to find the style corresponding to a shape in the image (what's the style number of the \"circle shape\" created by \"A\" in the padlock example? You have to count the image's shapes to find that out!).\r\nWhy not simply use the image's characters as style indexes (the style indexed by \"A\" would correspond to the circle shape \"A\" in the padlock example)? Of course there's a problem with polygon shapes consisting of multiple characters, but in this case one could simply use the polygon's first character (\"3\" is the style index of the polygon made from \"3\", \"4\", \"5\", \"6\")."}}