{"action":"created","issue":{"url":"https://api.github.com/repos/memononen/nanovg/issues/230","labels_url":"https://api.github.com/repos/memononen/nanovg/issues/230/labels{/name}","comments_url":"https://api.github.com/repos/memononen/nanovg/issues/230/comments","events_url":"https://api.github.com/repos/memononen/nanovg/issues/230/events","html_url":"https://github.com/memononen/nanovg/pull/230","id":93134333,"number":230,"title":"Added picking/hit regions","user":{"login":"MikeWW","id":1582445,"avatar_url":"https://avatars.githubusercontent.com/u/1582445?v=3","gravatar_id":"","url":"https://api.github.com/users/MikeWW","html_url":"https://github.com/MikeWW","followers_url":"https://api.github.com/users/MikeWW/followers","following_url":"https://api.github.com/users/MikeWW/following{/other_user}","gists_url":"https://api.github.com/users/MikeWW/gists{/gist_id}","starred_url":"https://api.github.com/users/MikeWW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikeWW/subscriptions","organizations_url":"https://api.github.com/users/MikeWW/orgs","repos_url":"https://api.github.com/users/MikeWW/repos","events_url":"https://api.github.com/users/MikeWW/events{/privacy}","received_events_url":"https://api.github.com/users/MikeWW/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-05T18:35:09Z","updated_at":"2015-07-09T13:18:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/memononen/nanovg/pulls/230","html_url":"https://github.com/memononen/nanovg/pull/230","diff_url":"https://github.com/memononen/nanovg/pull/230.diff","patch_url":"https://github.com/memononen/nanovg/pull/230.patch"},"body":"As discussed in issue #197.\r\n\r\n(Also added the missing files from the original check in :-) )\r\n\r\nWorking nvgInFill and nvgInStroke have been added, although I may tweak them a bit in the future.\r\n\r\nHappy to make any other changes etc... \r\n\r\nNew functions:\r\n```C\r\n// Marks the fill of the current path as pickable with the specified id.\r\nvoid nvgFillHitRegion(NVGcontext* ctx, int id);\r\n\r\n// Marks the stroke of the current path as pickable with the specified id.\r\nvoid nvgStrokeHitRegion(NVGcontext* ctx, int id);\r\n\r\n// ...\r\n\r\nenum NVGPickFlags {\r\n\tNVG_TEST_FILL\t= 1,\r\n\tNVG_TEST_STROKE = 2,\r\n\tNVG_TEST_ALL = 3,\r\n};\r\n\r\n// Returns the id of the topmost pickable hit region containing x,y or -1 if not shape is found.\r\nint nvgHitTest(NVGcontext* ctx, float x, float y, int flags);\r\n\r\n// Fills ids with a list of the top most maxids ids under the specified position.\r\n// Returns the number of ids filled.\r\nint nvgHitTestAll(NVGcontext* ctx, float x, float y, int flags, int* ids, int maxids);\r\n\r\n// Returns 1 if the given point is within the fill of the currently defined path.\r\n// Returns 0 otherwise.\r\nint nvgInFill(NVGcontext* ctx, float x, float y);\r\n\r\n// Returns 1 if the given point is within the stroke of the currently defined path.\r\n// Returns 0 otherwise.\r\nint nvgInStroke(NVGcontext* ctx, float x, float y);\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/memononen/nanovg/issues/comments/119960629","html_url":"https://github.com/memononen/nanovg/pull/230#issuecomment-119960629","issue_url":"https://api.github.com/repos/memononen/nanovg/issues/230","id":119960629,"user":{"login":"memononen","id":5249992,"avatar_url":"https://avatars.githubusercontent.com/u/5249992?v=3","gravatar_id":"","url":"https://api.github.com/users/memononen","html_url":"https://github.com/memononen","followers_url":"https://api.github.com/users/memononen/followers","following_url":"https://api.github.com/users/memononen/following{/other_user}","gists_url":"https://api.github.com/users/memononen/gists{/gist_id}","starred_url":"https://api.github.com/users/memononen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/memononen/subscriptions","organizations_url":"https://api.github.com/users/memononen/orgs","repos_url":"https://api.github.com/users/memononen/repos","events_url":"https://api.github.com/users/memononen/events{/privacy}","received_events_url":"https://api.github.com/users/memononen/received_events","type":"User","site_admin":false},"created_at":"2015-07-09T13:18:09Z","updated_at":"2015-07-09T13:18:09Z","body":"To keep things simple, I think the best way for the demo is to put it in one separate file, just like the fbo demo.\r\n\r\nI'll try to find time over the weekend to take a proper look at the changes."}}