{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/WinObjC/pulls/comments/98143421","pull_request_review_id":18776555,"id":98143421,"diff_hunk":"@@ -494,11 +494,16 @@ - (void)drawAtPoint:(CGPoint)point blendMode:(CGBlendMode)mode alpha:(float)alph\n     pos.size.height = (img_width / _scale);\n \n     srcRect.origin.x = 0;\n-    srcRect.origin.y = img_height;\n+    srcRect.origin.y = 0;\n     srcRect.size.width = img_width;\n-    srcRect.size.height = -img_height;\n+    srcRect.size.height = img_height;\n \n-    _CGContextDrawImageRect(cur, img, srcRect, pos);\n+    // |1  0 0| is the transformation matrix for flipping a rect about its Y midpoint m. (m = (y + h/2))\n+    // |0 -1 0|\n+    // |0 2m 1|\n+    CGContextConcatCTM(cur, CGAffineTransformMake(1,0,0,-1,0,2*(pos.origin.y+(pos.size.height/2))));","path":"Frameworks/UIKit/UIImage.mm","position":14,"original_position":14,"commit_id":"693735d0e356cab4ee98315e0c9094591a070e34","original_commit_id":"693735d0e356cab4ee98315e0c9094591a070e34","user":{"login":"aballway","id":7557395,"avatar_url":"https://avatars.githubusercontent.com/u/7557395?v=3","gravatar_id":"","url":"https://api.github.com/users/aballway","html_url":"https://github.com/aballway","followers_url":"https://api.github.com/users/aballway/followers","following_url":"https://api.github.com/users/aballway/following{/other_user}","gists_url":"https://api.github.com/users/aballway/gists{/gist_id}","starred_url":"https://api.github.com/users/aballway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aballway/subscriptions","organizations_url":"https://api.github.com/users/aballway/orgs","repos_url":"https://api.github.com/users/aballway/repos","events_url":"https://api.github.com/users/aballway/events{/privacy}","received_events_url":"https://api.github.com/users/aballway/received_events","type":"User","site_admin":false},"body":"nit: pls the spaces","created_at":"2017-01-27T04:28:48Z","updated_at":"2017-01-27T04:29:21Z","html_url":"https://github.com/Microsoft/WinObjC/pull/1847#discussion_r98143421","pull_request_url":"https://api.github.com/repos/Microsoft/WinObjC/pulls/1847","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/WinObjC/pulls/comments/98143421"},"html":{"href":"https://github.com/Microsoft/WinObjC/pull/1847#discussion_r98143421"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/WinObjC/pulls/1847"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/WinObjC/pulls/1847","id":103427683,"html_url":"https://github.com/Microsoft/WinObjC/pull/1847","diff_url":"https://github.com/Microsoft/WinObjC/pull/1847.diff","patch_url":"https://github.com/Microsoft/WinObjC/pull/1847.patch","issue_url":"https://api.github.com/repos/Microsoft/WinObjC/issues/1847","number":1847,"state":"open","locked":false,"title":"Fix the upside-down UIImage drawing encountered in IslandwoodNews.","user":{"login":"DHowett-MSFT","id":14316954,"avatar_url":"https://avatars.githubusercontent.com/u/14316954?v=3","gravatar_id":"","url":"https://api.github.com/users/DHowett-MSFT","html_url":"https://github.com/DHowett-MSFT","followers_url":"https://api.github.com/users/DHowett-MSFT/followers","following_url":"https://api.github.com/users/DHowett-MSFT/following{/other_user}","gists_url":"https://api.github.com/users/DHowett-MSFT/gists{/gist_id}","starred_url":"https://api.github.com/users/DHowett-MSFT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DHowett-MSFT/subscriptions","organizations_url":"https://api.github.com/users/DHowett-MSFT/orgs","repos_url":"https://api.github.com/users/DHowett-MSFT/repos","events_url":"https://api.github.com/users/DHowett-MSFT/events{/privacy}","received_events_url":"https://api.github.com/users/DHowett-MSFT/received_events","type":"User","site_admin":false},"body":"This pull request comprises two commits:\r\n* One commit that fixes our upside-down image drawing. Cairo was taking a negative-height image to mean \"draw upside-down\", but D2D took that to mean \"LOL everything is fine\"...\r\n    * On the reference platform, height -300 actually means \"draw 300 points above the origin\".\r\n* One commit that reimplements _CGContextDrawImageRect, the workhorse for out 9patch image drawing code. This was validated independently.\r\n\r\nTest 9patch image:\r\n![test9patch](https://cloud.githubusercontent.com/assets/14316954/22358140/c7d2e990-e3f1-11e6-8353-01bb27ed9d2e.png)\r\n\r\nUIImage rendering:\r\n![image](https://cloud.githubusercontent.com/assets/14316954/22358150/d81ed048-e3f1-11e6-8837-2343f91edcfa.png)\r\n\r\nFixes #1827.","created_at":"2017-01-27T02:04:53Z","updated_at":"2017-01-27T04:29:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1e80e71843387728c212165adacce07444c0e88c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/WinObjC/pulls/1847/commits","review_comments_url":"https://api.github.com/repos/Microsoft/WinObjC/pulls/1847/comments","review_comment_url":"https://api.github.com/repos/Microsoft/WinObjC/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/WinObjC/issues/1847/comments","statuses_url":"https://api.github.com/repos/Microsoft/WinObjC/statuses/693735d0e356cab4ee98315e0c9094591a070e34","head":{"label":"DHowett-MSFT:201701-fix-imagedraw","ref":"201701-fix-imagedraw","sha":"693735d0e356cab4ee98315e0c9094591a070e34","user":{"login":"DHowett-MSFT","id":14316954,"avatar_url":"https://avatars.githubusercontent.com/u/14316954?v=3","gravatar_id":"","url":"https://api.github.com/users/DHowett-MSFT","html_url":"https://github.com/DHowett-MSFT","followers_url":"https://api.github.com/users/DHowett-MSFT/followers","following_url":"https://api.github.com/users/DHowett-MSFT/following{/other_user}","gists_url":"https://api.github.com/users/DHowett-MSFT/gists{/gist_id}","starred_url":"https://api.github.com/users/DHowett-MSFT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DHowett-MSFT/subscriptions","organizations_url":"https://api.github.com/users/DHowett-MSFT/orgs","repos_url":"https://api.github.com/users/DHowett-MSFT/repos","events_url":"https://api.github.com/users/DHowett-MSFT/events{/privacy}","received_events_url":"https://api.github.com/users/DHowett-MSFT/received_events","type":"User","site_admin":false},"repo":{"id":62662505,"name":"WinObjC","full_name":"DHowett-MSFT/WinObjC","owner":{"login":"DHowett-MSFT","id":14316954,"avatar_url":"https://avatars.githubusercontent.com/u/14316954?v=3","gravatar_id":"","url":"https://api.github.com/users/DHowett-MSFT","html_url":"https://github.com/DHowett-MSFT","followers_url":"https://api.github.com/users/DHowett-MSFT/followers","following_url":"https://api.github.com/users/DHowett-MSFT/following{/other_user}","gists_url":"https://api.github.com/users/DHowett-MSFT/gists{/gist_id}","starred_url":"https://api.github.com/users/DHowett-MSFT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DHowett-MSFT/subscriptions","organizations_url":"https://api.github.com/users/DHowett-MSFT/orgs","repos_url":"https://api.github.com/users/DHowett-MSFT/repos","events_url":"https://api.github.com/users/DHowett-MSFT/events{/privacy}","received_events_url":"https://api.github.com/users/DHowett-MSFT/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DHowett-MSFT/WinObjC","description":"Objective-C for Windows","fork":true,"url":"https://api.github.com/repos/DHowett-MSFT/WinObjC","forks_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/forks","keys_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/teams","hooks_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/hooks","issue_events_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/issues/events{/number}","events_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/events","assignees_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/assignees{/user}","branches_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/branches{/branch}","tags_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/tags","blobs_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/git/refs{/sha}","trees_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/statuses/{sha}","languages_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/languages","stargazers_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/stargazers","contributors_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/contributors","subscribers_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/subscribers","subscription_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/subscription","commits_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/commits{/sha}","git_commits_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/git/commits{/sha}","comments_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/comments{/number}","issue_comment_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/issues/comments{/number}","contents_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/contents/{+path}","compare_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/merges","archive_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/downloads","issues_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/issues{/number}","pulls_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/pulls{/number}","milestones_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/milestones{/number}","notifications_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/labels{/name}","releases_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/releases{/id}","deployments_url":"https://api.github.com/repos/DHowett-MSFT/WinObjC/deployments","created_at":"2016-07-05T19:09:17Z","updated_at":"2016-07-05T19:09:32Z","pushed_at":"2017-01-27T01:49:37Z","git_url":"git://github.com/DHowett-MSFT/WinObjC.git","ssh_url":"git@github.com:DHowett-MSFT/WinObjC.git","clone_url":"https://github.com/DHowett-MSFT/WinObjC.git","svn_url":"https://github.com/DHowett-MSFT/WinObjC","homepage":"","size":337097,"stargazers_count":0,"watchers_count":0,"language":"Objective-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":"develop"}},"base":{"label":"Microsoft:CGD2D","ref":"CGD2D","sha":"939705d0a8559622cfa521d3a963cf0ebf0f9c1d","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":37950166,"name":"WinObjC","full_name":"Microsoft/WinObjC","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/WinObjC","description":"Objective-C for Windows","fork":false,"url":"https://api.github.com/repos/Microsoft/WinObjC","forks_url":"https://api.github.com/repos/Microsoft/WinObjC/forks","keys_url":"https://api.github.com/repos/Microsoft/WinObjC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/WinObjC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/WinObjC/teams","hooks_url":"https://api.github.com/repos/Microsoft/WinObjC/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/WinObjC/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/WinObjC/events","assignees_url":"https://api.github.com/repos/Microsoft/WinObjC/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/WinObjC/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/WinObjC/tags","blobs_url":"https://api.github.com/repos/Microsoft/WinObjC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/WinObjC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/WinObjC/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/WinObjC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/WinObjC/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/WinObjC/languages","stargazers_url":"https://api.github.com/repos/Microsoft/WinObjC/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/WinObjC/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/WinObjC/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/WinObjC/subscription","commits_url":"https://api.github.com/repos/Microsoft/WinObjC/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/WinObjC/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/WinObjC/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/WinObjC/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/WinObjC/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/WinObjC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/WinObjC/merges","archive_url":"https://api.github.com/repos/Microsoft/WinObjC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/WinObjC/downloads","issues_url":"https://api.github.com/repos/Microsoft/WinObjC/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/WinObjC/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/WinObjC/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/WinObjC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/WinObjC/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/WinObjC/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/WinObjC/deployments","created_at":"2015-06-23T23:14:58Z","updated_at":"2017-01-27T03:36:13Z","pushed_at":"2017-01-27T02:30:38Z","git_url":"git://github.com/Microsoft/WinObjC.git","ssh_url":"git@github.com:Microsoft/WinObjC.git","clone_url":"https://github.com/Microsoft/WinObjC.git","svn_url":"https://github.com/Microsoft/WinObjC","homepage":"","size":377430,"stargazers_count":5578,"watchers_count":5578,"language":"Objective-C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":742,"mirror_url":null,"open_issues_count":306,"forks":742,"open_issues":306,"watchers":5578,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/WinObjC/pulls/1847"},"html":{"href":"https://github.com/Microsoft/WinObjC/pull/1847"},"issue":{"href":"https://api.github.com/repos/Microsoft/WinObjC/issues/1847"},"comments":{"href":"https://api.github.com/repos/Microsoft/WinObjC/issues/1847/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/WinObjC/pulls/1847/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/WinObjC/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/WinObjC/pulls/1847/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/WinObjC/statuses/693735d0e356cab4ee98315e0c9094591a070e34"}}}}
{"actor":{"display_login":"aballway"}}