{"action":"created","comment":{"url":"https://api.github.com/repos/mamimon/suwanitaJump/pulls/comments/73798125","id":73798125,"diff_hunk":"@@ -1,5 +1,100 @@\n package suwanitaJump.screen;\n \n-public class Title {\n+import java.awt.Canvas;\n+import java.awt.Color;\n+import java.awt.Graphics;\n+import java.awt.Image;\n+import java.awt.MediaTracker;\n+import java.awt.Toolkit;\n+import java.awt.image.BufferedImage;\n+import java.awt.image.ImageObserver;\n+import java.awt.image.PixelGrabber;\n \n+import suwanitaJump.cnst.SuwanitaJumpConst;\n+import suwanitaJump.judge.ClickCheck;\n+import suwanitaJump.judge.KeyCheck;\n+\n+public class Title implements ImageObserver{\n+\t/** 背景の画像 */\n+\tprivate BufferedImage backGroundImage = null;\n+\n+\t/** スタートボタンの画像 */\n+\tprivate BufferedImage startButtonImage = null;\n+\n+\t/**\n+\t * Titleクラスのコンストラクタ\n+\t */\n+\tpublic Title(){\n+\t\t// 背景画像の初期化\n+\t\tbackGroundImage = loadImage(SuwanitaJumpConst.TITLE_BACKGROUND_IMAGE);\n+\t\t// スタートボタン画像の初期化\n+\t\t//startButtonImage = loadImage(SuwanitaJumpConst.TITLE_START_BUTTON_IMAGE);\n+\t}\n+\n+\t/**\n+\t * タイトル画面を描画する\n+\t * @param g 描画操作のためのオブジェクト\n+\t * @return なし\n+\t */\n+\tpublic void drawTitle(Graphics g){\n+\t\t//タイトル画面の背景を描画\n+\t\tg.drawImage(backGroundImage, 0, 0, this);\n+\t}\n+\n+\t/**\n+\t * 画像のURLから画像を読み込む\n+\t * @param path 画像のURL\n+\t * @return 読み込んだ画像\n+\t */\n+\tpublic BufferedImage loadImage(String path){\n+\t\tint transcl = new Color(0, 0, 0, 0).getRGB();\n+\t\tMediaTracker tr = new MediaTracker(new Canvas());\n+\t\tImage img = Toolkit.getDefaultToolkit().getImage(path);\n+\t\ttr.addImage(img, 0);\n+\t\ttry {\n+\t\t\ttr.waitForAll();\n+\t\t} catch (InterruptedException e) {\n+\t\t}\n+\t\tint wd = img.getWidth(null);\n+\t\tint ht = img.getHeight(null);\n+\t\tint[] buf = new int[wd*ht];\n+\t\tPixelGrabber grab = new PixelGrabber(img, 0, 0, wd, ht, buf, 0, wd);\n+\t\ttry {\n+\t\t\tgrab.grabPixels();\n+\t\t} catch (InterruptedException e) {\n+\t\t}\n+\t\tBufferedImage retimg = new BufferedImage(wd, ht, BufferedImage.TYPE_INT_ARGB);\n+\t\tfor (int y = 0; y < ht; y++) {\n+\t\t\tfor (int x = 0; x < wd; x++) {\n+\t\t\t\tint cl = buf[y*wd+x];\n+\t\t\t\tif (cl == buf[0]) {\n+\t\t\t\t\tcl = transcl;\n+\t\t\t\t}\n+\t\t\t\tretimg.setRGB(x, y, cl);\n+\t\t\t}\n+\t\t}\n+\t\treturn retimg;\n+\t}\n+\n+\t/**\n+\t *","path":"src/suwanitaJump/screen/Title.java","position":81,"original_position":81,"commit_id":"e935ae3effd189a607b37b24f4a83123def8fca8","original_commit_id":"e935ae3effd189a607b37b24f4a83123def8fca8","user":{"login":"kamukamo","id":18752293,"avatar_url":"https://avatars.githubusercontent.com/u/18752293?v=3","gravatar_id":"","url":"https://api.github.com/users/kamukamo","html_url":"https://github.com/kamukamo","followers_url":"https://api.github.com/users/kamukamo/followers","following_url":"https://api.github.com/users/kamukamo/following{/other_user}","gists_url":"https://api.github.com/users/kamukamo/gists{/gist_id}","starred_url":"https://api.github.com/users/kamukamo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamukamo/subscriptions","organizations_url":"https://api.github.com/users/kamukamo/orgs","repos_url":"https://api.github.com/users/kamukamo/repos","events_url":"https://api.github.com/users/kamukamo/events{/privacy}","received_events_url":"https://api.github.com/users/kamukamo/received_events","type":"User","site_admin":false},"body":"メソッドの説明がないっぽい","created_at":"2016-08-07T08:41:11Z","updated_at":"2016-08-07T08:41:11Z","html_url":"https://github.com/mamimon/suwanitaJump/pull/6#discussion_r73798125","pull_request_url":"https://api.github.com/repos/mamimon/suwanitaJump/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/mamimon/suwanitaJump/pulls/comments/73798125"},"html":{"href":"https://github.com/mamimon/suwanitaJump/pull/6#discussion_r73798125"},"pull_request":{"href":"https://api.github.com/repos/mamimon/suwanitaJump/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/mamimon/suwanitaJump/pulls/6","id":80361583,"html_url":"https://github.com/mamimon/suwanitaJump/pull/6","diff_url":"https://github.com/mamimon/suwanitaJump/pull/6.diff","patch_url":"https://github.com/mamimon/suwanitaJump/pull/6.patch","issue_url":"https://api.github.com/repos/mamimon/suwanitaJump/issues/6","number":6,"state":"open","locked":false,"title":"背景を描画し、Enterキーを押すと画面遷移まで実装","user":{"login":"mamimon","id":18750553,"avatar_url":"https://avatars.githubusercontent.com/u/18750553?v=3","gravatar_id":"","url":"https://api.github.com/users/mamimon","html_url":"https://github.com/mamimon","followers_url":"https://api.github.com/users/mamimon/followers","following_url":"https://api.github.com/users/mamimon/following{/other_user}","gists_url":"https://api.github.com/users/mamimon/gists{/gist_id}","starred_url":"https://api.github.com/users/mamimon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mamimon/subscriptions","organizations_url":"https://api.github.com/users/mamimon/orgs","repos_url":"https://api.github.com/users/mamimon/repos","events_url":"https://api.github.com/users/mamimon/events{/privacy}","received_events_url":"https://api.github.com/users/mamimon/received_events","type":"User","site_admin":false},"body":"【タイトル画面】背景を描画し、Enterキーを押すと画面遷移まで実装","created_at":"2016-08-07T08:28:41Z","updated_at":"2016-08-07T08:41:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"902ce359f8ae0e35c24dae4a161ecbcd72b4de47","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mamimon/suwanitaJump/pulls/6/commits","review_comments_url":"https://api.github.com/repos/mamimon/suwanitaJump/pulls/6/comments","review_comment_url":"https://api.github.com/repos/mamimon/suwanitaJump/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mamimon/suwanitaJump/issues/6/comments","statuses_url":"https://api.github.com/repos/mamimon/suwanitaJump/statuses/e935ae3effd189a607b37b24f4a83123def8fca8","head":{"label":"mamimon:scene_title","ref":"scene_title","sha":"e935ae3effd189a607b37b24f4a83123def8fca8","user":{"login":"mamimon","id":18750553,"avatar_url":"https://avatars.githubusercontent.com/u/18750553?v=3","gravatar_id":"","url":"https://api.github.com/users/mamimon","html_url":"https://github.com/mamimon","followers_url":"https://api.github.com/users/mamimon/followers","following_url":"https://api.github.com/users/mamimon/following{/other_user}","gists_url":"https://api.github.com/users/mamimon/gists{/gist_id}","starred_url":"https://api.github.com/users/mamimon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mamimon/subscriptions","organizations_url":"https://api.github.com/users/mamimon/orgs","repos_url":"https://api.github.com/users/mamimon/repos","events_url":"https://api.github.com/users/mamimon/events{/privacy}","received_events_url":"https://api.github.com/users/mamimon/received_events","type":"User","site_admin":false},"repo":{"id":65061422,"name":"suwanitaJump","full_name":"mamimon/suwanitaJump","owner":{"login":"mamimon","id":18750553,"avatar_url":"https://avatars.githubusercontent.com/u/18750553?v=3","gravatar_id":"","url":"https://api.github.com/users/mamimon","html_url":"https://github.com/mamimon","followers_url":"https://api.github.com/users/mamimon/followers","following_url":"https://api.github.com/users/mamimon/following{/other_user}","gists_url":"https://api.github.com/users/mamimon/gists{/gist_id}","starred_url":"https://api.github.com/users/mamimon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mamimon/subscriptions","organizations_url":"https://api.github.com/users/mamimon/orgs","repos_url":"https://api.github.com/users/mamimon/repos","events_url":"https://api.github.com/users/mamimon/events{/privacy}","received_events_url":"https://api.github.com/users/mamimon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mamimon/suwanitaJump","description":null,"fork":false,"url":"https://api.github.com/repos/mamimon/suwanitaJump","forks_url":"https://api.github.com/repos/mamimon/suwanitaJump/forks","keys_url":"https://api.github.com/repos/mamimon/suwanitaJump/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mamimon/suwanitaJump/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mamimon/suwanitaJump/teams","hooks_url":"https://api.github.com/repos/mamimon/suwanitaJump/hooks","issue_events_url":"https://api.github.com/repos/mamimon/suwanitaJump/issues/events{/number}","events_url":"https://api.github.com/repos/mamimon/suwanitaJump/events","assignees_url":"https://api.github.com/repos/mamimon/suwanitaJump/assignees{/user}","branches_url":"https://api.github.com/repos/mamimon/suwanitaJump/branches{/branch}","tags_url":"https://api.github.com/repos/mamimon/suwanitaJump/tags","blobs_url":"https://api.github.com/repos/mamimon/suwanitaJump/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mamimon/suwanitaJump/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mamimon/suwanitaJump/git/refs{/sha}","trees_url":"https://api.github.com/repos/mamimon/suwanitaJump/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mamimon/suwanitaJump/statuses/{sha}","languages_url":"https://api.github.com/repos/mamimon/suwanitaJump/languages","stargazers_url":"https://api.github.com/repos/mamimon/suwanitaJump/stargazers","contributors_url":"https://api.github.com/repos/mamimon/suwanitaJump/contributors","subscribers_url":"https://api.github.com/repos/mamimon/suwanitaJump/subscribers","subscription_url":"https://api.github.com/repos/mamimon/suwanitaJump/subscription","commits_url":"https://api.github.com/repos/mamimon/suwanitaJump/commits{/sha}","git_commits_url":"https://api.github.com/repos/mamimon/suwanitaJump/git/commits{/sha}","comments_url":"https://api.github.com/repos/mamimon/suwanitaJump/comments{/number}","issue_comment_url":"https://api.github.com/repos/mamimon/suwanitaJump/issues/comments{/number}","contents_url":"https://api.github.com/repos/mamimon/suwanitaJump/contents/{+path}","compare_url":"https://api.github.com/repos/mamimon/suwanitaJump/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mamimon/suwanitaJump/merges","archive_url":"https://api.github.com/repos/mamimon/suwanitaJump/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mamimon/suwanitaJump/downloads","issues_url":"https://api.github.com/repos/mamimon/suwanitaJump/issues{/number}","pulls_url":"https://api.github.com/repos/mamimon/suwanitaJump/pulls{/number}","milestones_url":"https://api.github.com/repos/mamimon/suwanitaJump/milestones{/number}","notifications_url":"https://api.github.com/repos/mamimon/suwanitaJump/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mamimon/suwanitaJump/labels{/name}","releases_url":"https://api.github.com/repos/mamimon/suwanitaJump/releases{/id}","deployments_url":"https://api.github.com/repos/mamimon/suwanitaJump/deployments","created_at":"2016-08-06T02:40:44Z","updated_at":"2016-08-06T02:58:53Z","pushed_at":"2016-08-07T08:28:41Z","git_url":"git://github.com/mamimon/suwanitaJump.git","ssh_url":"git@github.com:mamimon/suwanitaJump.git","clone_url":"https://github.com/mamimon/suwanitaJump.git","svn_url":"https://github.com/mamimon/suwanitaJump","homepage":null,"size":20,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"mamimon:develop","ref":"develop","sha":"0522ee67f3fbd68fed961921d43c66abe7b84dfe","user":{"login":"mamimon","id":18750553,"avatar_url":"https://avatars.githubusercontent.com/u/18750553?v=3","gravatar_id":"","url":"https://api.github.com/users/mamimon","html_url":"https://github.com/mamimon","followers_url":"https://api.github.com/users/mamimon/followers","following_url":"https://api.github.com/users/mamimon/following{/other_user}","gists_url":"https://api.github.com/users/mamimon/gists{/gist_id}","starred_url":"https://api.github.com/users/mamimon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mamimon/subscriptions","organizations_url":"https://api.github.com/users/mamimon/orgs","repos_url":"https://api.github.com/users/mamimon/repos","events_url":"https://api.github.com/users/mamimon/events{/privacy}","received_events_url":"https://api.github.com/users/mamimon/received_events","type":"User","site_admin":false},"repo":{"id":65061422,"name":"suwanitaJump","full_name":"mamimon/suwanitaJump","owner":{"login":"mamimon","id":18750553,"avatar_url":"https://avatars.githubusercontent.com/u/18750553?v=3","gravatar_id":"","url":"https://api.github.com/users/mamimon","html_url":"https://github.com/mamimon","followers_url":"https://api.github.com/users/mamimon/followers","following_url":"https://api.github.com/users/mamimon/following{/other_user}","gists_url":"https://api.github.com/users/mamimon/gists{/gist_id}","starred_url":"https://api.github.com/users/mamimon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mamimon/subscriptions","organizations_url":"https://api.github.com/users/mamimon/orgs","repos_url":"https://api.github.com/users/mamimon/repos","events_url":"https://api.github.com/users/mamimon/events{/privacy}","received_events_url":"https://api.github.com/users/mamimon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mamimon/suwanitaJump","description":null,"fork":false,"url":"https://api.github.com/repos/mamimon/suwanitaJump","forks_url":"https://api.github.com/repos/mamimon/suwanitaJump/forks","keys_url":"https://api.github.com/repos/mamimon/suwanitaJump/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mamimon/suwanitaJump/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mamimon/suwanitaJump/teams","hooks_url":"https://api.github.com/repos/mamimon/suwanitaJump/hooks","issue_events_url":"https://api.github.com/repos/mamimon/suwanitaJump/issues/events{/number}","events_url":"https://api.github.com/repos/mamimon/suwanitaJump/events","assignees_url":"https://api.github.com/repos/mamimon/suwanitaJump/assignees{/user}","branches_url":"https://api.github.com/repos/mamimon/suwanitaJump/branches{/branch}","tags_url":"https://api.github.com/repos/mamimon/suwanitaJump/tags","blobs_url":"https://api.github.com/repos/mamimon/suwanitaJump/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mamimon/suwanitaJump/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mamimon/suwanitaJump/git/refs{/sha}","trees_url":"https://api.github.com/repos/mamimon/suwanitaJump/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mamimon/suwanitaJump/statuses/{sha}","languages_url":"https://api.github.com/repos/mamimon/suwanitaJump/languages","stargazers_url":"https://api.github.com/repos/mamimon/suwanitaJump/stargazers","contributors_url":"https://api.github.com/repos/mamimon/suwanitaJump/contributors","subscribers_url":"https://api.github.com/repos/mamimon/suwanitaJump/subscribers","subscription_url":"https://api.github.com/repos/mamimon/suwanitaJump/subscription","commits_url":"https://api.github.com/repos/mamimon/suwanitaJump/commits{/sha}","git_commits_url":"https://api.github.com/repos/mamimon/suwanitaJump/git/commits{/sha}","comments_url":"https://api.github.com/repos/mamimon/suwanitaJump/comments{/number}","issue_comment_url":"https://api.github.com/repos/mamimon/suwanitaJump/issues/comments{/number}","contents_url":"https://api.github.com/repos/mamimon/suwanitaJump/contents/{+path}","compare_url":"https://api.github.com/repos/mamimon/suwanitaJump/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mamimon/suwanitaJump/merges","archive_url":"https://api.github.com/repos/mamimon/suwanitaJump/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mamimon/suwanitaJump/downloads","issues_url":"https://api.github.com/repos/mamimon/suwanitaJump/issues{/number}","pulls_url":"https://api.github.com/repos/mamimon/suwanitaJump/pulls{/number}","milestones_url":"https://api.github.com/repos/mamimon/suwanitaJump/milestones{/number}","notifications_url":"https://api.github.com/repos/mamimon/suwanitaJump/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mamimon/suwanitaJump/labels{/name}","releases_url":"https://api.github.com/repos/mamimon/suwanitaJump/releases{/id}","deployments_url":"https://api.github.com/repos/mamimon/suwanitaJump/deployments","created_at":"2016-08-06T02:40:44Z","updated_at":"2016-08-06T02:58:53Z","pushed_at":"2016-08-07T08:28:41Z","git_url":"git://github.com/mamimon/suwanitaJump.git","ssh_url":"git@github.com:mamimon/suwanitaJump.git","clone_url":"https://github.com/mamimon/suwanitaJump.git","svn_url":"https://github.com/mamimon/suwanitaJump","homepage":null,"size":20,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mamimon/suwanitaJump/pulls/6"},"html":{"href":"https://github.com/mamimon/suwanitaJump/pull/6"},"issue":{"href":"https://api.github.com/repos/mamimon/suwanitaJump/issues/6"},"comments":{"href":"https://api.github.com/repos/mamimon/suwanitaJump/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/mamimon/suwanitaJump/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/mamimon/suwanitaJump/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mamimon/suwanitaJump/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/mamimon/suwanitaJump/statuses/e935ae3effd189a607b37b24f4a83123def8fca8"}}}}
{"actor":{"display_login":"kamukamo"}}