{"action":"created","comment":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/comments/32598749","id":32598749,"diff_hunk":"@@ -0,0 +1,669 @@\n+/****************************************************************************\n+Copyright (c) 2008-2010 Ricardo Quesada\n+Copyright (c) 2010-2012 cocos2d-x.org\n+Copyright (c) 2011      Zynga Inc.\n+Copyright (c) 2013-2014 Chukong Technologies Inc.\n+ \n+http://www.cocos2d-x.org\n+\n+Permission is hereby granted, free of charge, to any person obtaining a copy\n+of this software and associated documentation files (the \"Software\"), to deal\n+in the Software without restriction, including without limitation the rights\n+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+copies of the Software, and to permit persons to whom the Software is\n+furnished to do so, subject to the following conditions:\n+\n+The above copyright notice and this permission notice shall be included in\n+all copies or substantial portions of the Software.\n+\n+THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n+THE SOFTWARE.\n+****************************************************************************/\n+\n+#include \"CCAutoPolygon.h\"\n+#include \"poly2tri/poly2tri.h\"\n+#include \"base/CCDirector.h\"\n+#include \"renderer/CCTextureCache.h\"\n+#include \"clipper/clipper.hpp\"\n+#include <algorithm>\n+#include <math.h>","path":"cocos/2d/CCAutoPolygon.cpp","position":34,"original_position":34,"commit_id":"e2178c30a00d0d8f7052340e418d82ca46993d5f","original_commit_id":"e2178c30a00d0d8f7052340e418d82ca46993d5f","user":{"login":"andyque","id":785541,"avatar_url":"https://avatars.githubusercontent.com/u/785541?v=3","gravatar_id":"","url":"https://api.github.com/users/andyque","html_url":"https://github.com/andyque","followers_url":"https://api.github.com/users/andyque/followers","following_url":"https://api.github.com/users/andyque/following{/other_user}","gists_url":"https://api.github.com/users/andyque/gists{/gist_id}","starred_url":"https://api.github.com/users/andyque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyque/subscriptions","organizations_url":"https://api.github.com/users/andyque/orgs","repos_url":"https://api.github.com/users/andyque/repos","events_url":"https://api.github.com/users/andyque/events{/privacy}","received_events_url":"https://api.github.com/users/andyque/received_events","type":"User","site_admin":false},"body":"The include order should be:  c header files, c++ header file, 3rd party library files and then project header file.","created_at":"2015-06-17T06:38:47Z","updated_at":"2015-06-17T06:38:47Z","html_url":"https://github.com/cocos2d/cocos2d-x/pull/12243#discussion_r32598749","pull_request_url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/12243","_links":{"self":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/comments/32598749"},"html":{"href":"https://github.com/cocos2d/cocos2d-x/pull/12243#discussion_r32598749"},"pull_request":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/12243"}}},"pull_request":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/12243","id":37126863,"html_url":"https://github.com/cocos2d/cocos2d-x/pull/12243","diff_url":"https://github.com/cocos2d/cocos2d-x/pull/12243.diff","patch_url":"https://github.com/cocos2d/cocos2d-x/pull/12243.patch","issue_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/12243","number":12243,"state":"open","locked":false,"title":"Fix spritepolygon","user":{"login":"Wu-Hao","id":1455994,"avatar_url":"https://avatars.githubusercontent.com/u/1455994?v=3","gravatar_id":"","url":"https://api.github.com/users/Wu-Hao","html_url":"https://github.com/Wu-Hao","followers_url":"https://api.github.com/users/Wu-Hao/followers","following_url":"https://api.github.com/users/Wu-Hao/following{/other_user}","gists_url":"https://api.github.com/users/Wu-Hao/gists{/gist_id}","starred_url":"https://api.github.com/users/Wu-Hao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wu-Hao/subscriptions","organizations_url":"https://api.github.com/users/Wu-Hao/orgs","repos_url":"https://api.github.com/users/Wu-Hao/repos","events_url":"https://api.github.com/users/Wu-Hao/events{/privacy}","received_events_url":"https://api.github.com/users/Wu-Hao/received_events","type":"User","site_admin":false},"body":"PolygonSprite is now removed, \r\nPolygon functionality merged into CCSprite, \r\nPolygonCache removed,\r\nAdded AutoPolygon helper class","created_at":"2015-06-08T07:11:45Z","updated_at":"2015-06-17T06:38:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b603d1f9c11e750e3d9a1652de3457c751cef49d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/12243/commits","review_comments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/12243/comments","review_comment_url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/12243/comments","statuses_url":"https://api.github.com/repos/cocos2d/cocos2d-x/statuses/e2178c30a00d0d8f7052340e418d82ca46993d5f","head":{"label":"Wu-Hao:fix_spritepolygon2","ref":"fix_spritepolygon2","sha":"e2178c30a00d0d8f7052340e418d82ca46993d5f","user":{"login":"Wu-Hao","id":1455994,"avatar_url":"https://avatars.githubusercontent.com/u/1455994?v=3","gravatar_id":"","url":"https://api.github.com/users/Wu-Hao","html_url":"https://github.com/Wu-Hao","followers_url":"https://api.github.com/users/Wu-Hao/followers","following_url":"https://api.github.com/users/Wu-Hao/following{/other_user}","gists_url":"https://api.github.com/users/Wu-Hao/gists{/gist_id}","starred_url":"https://api.github.com/users/Wu-Hao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wu-Hao/subscriptions","organizations_url":"https://api.github.com/users/Wu-Hao/orgs","repos_url":"https://api.github.com/users/Wu-Hao/repos","events_url":"https://api.github.com/users/Wu-Hao/events{/privacy}","received_events_url":"https://api.github.com/users/Wu-Hao/received_events","type":"User","site_admin":false},"repo":{"id":34371044,"name":"cocos2d-x","full_name":"Wu-Hao/cocos2d-x","owner":{"login":"Wu-Hao","id":1455994,"avatar_url":"https://avatars.githubusercontent.com/u/1455994?v=3","gravatar_id":"","url":"https://api.github.com/users/Wu-Hao","html_url":"https://github.com/Wu-Hao","followers_url":"https://api.github.com/users/Wu-Hao/followers","following_url":"https://api.github.com/users/Wu-Hao/following{/other_user}","gists_url":"https://api.github.com/users/Wu-Hao/gists{/gist_id}","starred_url":"https://api.github.com/users/Wu-Hao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wu-Hao/subscriptions","organizations_url":"https://api.github.com/users/Wu-Hao/orgs","repos_url":"https://api.github.com/users/Wu-Hao/repos","events_url":"https://api.github.com/users/Wu-Hao/events{/privacy}","received_events_url":"https://api.github.com/users/Wu-Hao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Wu-Hao/cocos2d-x","description":"cocos2d-x for C++","fork":true,"url":"https://api.github.com/repos/Wu-Hao/cocos2d-x","forks_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/forks","keys_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/teams","hooks_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/hooks","issue_events_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/issues/events{/number}","events_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/events","assignees_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/assignees{/user}","branches_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/branches{/branch}","tags_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/tags","blobs_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/statuses/{sha}","languages_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/languages","stargazers_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/stargazers","contributors_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/contributors","subscribers_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/subscribers","subscription_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/subscription","commits_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/contents/{+path}","compare_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/merges","archive_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/downloads","issues_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/issues{/number}","pulls_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/pulls{/number}","milestones_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/milestones{/number}","notifications_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/labels{/name}","releases_url":"https://api.github.com/repos/Wu-Hao/cocos2d-x/releases{/id}","created_at":"2015-04-22T05:36:52Z","updated_at":"2015-04-24T10:28:41Z","pushed_at":"2015-06-17T05:19:23Z","git_url":"git://github.com/Wu-Hao/cocos2d-x.git","ssh_url":"git@github.com:Wu-Hao/cocos2d-x.git","clone_url":"https://github.com/Wu-Hao/cocos2d-x.git","svn_url":"https://github.com/Wu-Hao/cocos2d-x","homepage":"http://www.cocos2d-x.org","size":850924,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"v3"}},"base":{"label":"cocos2d:v3","ref":"v3","sha":"9e937759c16e6dcc27b9470e68483c5ab887058c","user":{"login":"cocos2d","id":234324,"avatar_url":"https://avatars.githubusercontent.com/u/234324?v=3","gravatar_id":"","url":"https://api.github.com/users/cocos2d","html_url":"https://github.com/cocos2d","followers_url":"https://api.github.com/users/cocos2d/followers","following_url":"https://api.github.com/users/cocos2d/following{/other_user}","gists_url":"https://api.github.com/users/cocos2d/gists{/gist_id}","starred_url":"https://api.github.com/users/cocos2d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocos2d/subscriptions","organizations_url":"https://api.github.com/users/cocos2d/orgs","repos_url":"https://api.github.com/users/cocos2d/repos","events_url":"https://api.github.com/users/cocos2d/events{/privacy}","received_events_url":"https://api.github.com/users/cocos2d/received_events","type":"Organization","site_admin":false},"repo":{"id":1093228,"name":"cocos2d-x","full_name":"cocos2d/cocos2d-x","owner":{"login":"cocos2d","id":234324,"avatar_url":"https://avatars.githubusercontent.com/u/234324?v=3","gravatar_id":"","url":"https://api.github.com/users/cocos2d","html_url":"https://github.com/cocos2d","followers_url":"https://api.github.com/users/cocos2d/followers","following_url":"https://api.github.com/users/cocos2d/following{/other_user}","gists_url":"https://api.github.com/users/cocos2d/gists{/gist_id}","starred_url":"https://api.github.com/users/cocos2d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocos2d/subscriptions","organizations_url":"https://api.github.com/users/cocos2d/orgs","repos_url":"https://api.github.com/users/cocos2d/repos","events_url":"https://api.github.com/users/cocos2d/events{/privacy}","received_events_url":"https://api.github.com/users/cocos2d/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cocos2d/cocos2d-x","description":"cocos2d-x for C++","fork":false,"url":"https://api.github.com/repos/cocos2d/cocos2d-x","forks_url":"https://api.github.com/repos/cocos2d/cocos2d-x/forks","keys_url":"https://api.github.com/repos/cocos2d/cocos2d-x/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cocos2d/cocos2d-x/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cocos2d/cocos2d-x/teams","hooks_url":"https://api.github.com/repos/cocos2d/cocos2d-x/hooks","issue_events_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/events{/number}","events_url":"https://api.github.com/repos/cocos2d/cocos2d-x/events","assignees_url":"https://api.github.com/repos/cocos2d/cocos2d-x/assignees{/user}","branches_url":"https://api.github.com/repos/cocos2d/cocos2d-x/branches{/branch}","tags_url":"https://api.github.com/repos/cocos2d/cocos2d-x/tags","blobs_url":"https://api.github.com/repos/cocos2d/cocos2d-x/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cocos2d/cocos2d-x/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cocos2d/cocos2d-x/git/refs{/sha}","trees_url":"https://api.github.com/repos/cocos2d/cocos2d-x/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cocos2d/cocos2d-x/statuses/{sha}","languages_url":"https://api.github.com/repos/cocos2d/cocos2d-x/languages","stargazers_url":"https://api.github.com/repos/cocos2d/cocos2d-x/stargazers","contributors_url":"https://api.github.com/repos/cocos2d/cocos2d-x/contributors","subscribers_url":"https://api.github.com/repos/cocos2d/cocos2d-x/subscribers","subscription_url":"https://api.github.com/repos/cocos2d/cocos2d-x/subscription","commits_url":"https://api.github.com/repos/cocos2d/cocos2d-x/commits{/sha}","git_commits_url":"https://api.github.com/repos/cocos2d/cocos2d-x/git/commits{/sha}","comments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/comments{/number}","issue_comment_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/comments{/number}","contents_url":"https://api.github.com/repos/cocos2d/cocos2d-x/contents/{+path}","compare_url":"https://api.github.com/repos/cocos2d/cocos2d-x/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cocos2d/cocos2d-x/merges","archive_url":"https://api.github.com/repos/cocos2d/cocos2d-x/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cocos2d/cocos2d-x/downloads","issues_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues{/number}","pulls_url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls{/number}","milestones_url":"https://api.github.com/repos/cocos2d/cocos2d-x/milestones{/number}","notifications_url":"https://api.github.com/repos/cocos2d/cocos2d-x/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cocos2d/cocos2d-x/labels{/name}","releases_url":"https://api.github.com/repos/cocos2d/cocos2d-x/releases{/id}","created_at":"2010-11-18T23:17:00Z","updated_at":"2015-06-17T05:17:17Z","pushed_at":"2015-06-17T06:13:23Z","git_url":"git://github.com/cocos2d/cocos2d-x.git","ssh_url":"git@github.com:cocos2d/cocos2d-x.git","clone_url":"https://github.com/cocos2d/cocos2d-x.git","svn_url":"https://github.com/cocos2d/cocos2d-x","homepage":"http://www.cocos2d-x.org","size":1491744,"stargazers_count":6056,"watchers_count":6056,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4368,"mirror_url":null,"open_issues_count":706,"forks":4368,"open_issues":706,"watchers":6056,"default_branch":"v3"}},"_links":{"self":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/12243"},"html":{"href":"https://github.com/cocos2d/cocos2d-x/pull/12243"},"issue":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/12243"},"comments":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/12243/comments"},"review_comments":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/12243/comments"},"review_comment":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/12243/commits"},"statuses":{"href":"https://api.github.com/repos/cocos2d/cocos2d-x/statuses/e2178c30a00d0d8f7052340e418d82ca46993d5f"}}}}