{"action":"created","comment":{"url":"https://api.github.com/repos/magic-lang/ooc-kean/pulls/comments/51550692","id":51550692,"diff_hunk":"@@ -82,5 +106,10 @@ DrawState: cover {\n \t}\n \t// Normalized transform\n \tgetTransformNormalized: func -> FloatTransform3D { this _transformNormalized }\n-\tdraw: func { this target canvas draw(this) }\n+\tdraw: func {\n+\t\tversion(safe)\n+\t\t\tif (this target == null)\n+\t\t\t\traise(\"Can't draw without a selected target.\")","path":"source/draw/DrawState.ooc","position":84,"original_position":84,"commit_id":"f2908a55ed944a9a05be6b05cef9111fdadda224","original_commit_id":"f2908a55ed944a9a05be6b05cef9111fdadda224","user":{"login":"sebastianbaginski","id":13517893,"avatar_url":"https://avatars.githubusercontent.com/u/13517893?v=3","gravatar_id":"","url":"https://api.github.com/users/sebastianbaginski","html_url":"https://github.com/sebastianbaginski","followers_url":"https://api.github.com/users/sebastianbaginski/followers","following_url":"https://api.github.com/users/sebastianbaginski/following{/other_user}","gists_url":"https://api.github.com/users/sebastianbaginski/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastianbaginski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastianbaginski/subscriptions","organizations_url":"https://api.github.com/users/sebastianbaginski/orgs","repos_url":"https://api.github.com/users/sebastianbaginski/repos","events_url":"https://api.github.com/users/sebastianbaginski/events{/privacy}","received_events_url":"https://api.github.com/users/sebastianbaginski/received_events","type":"User","site_admin":false},"body":"Hmm could we introduce `raise: static func (condition: Bool, message: String) { if (condition) raise(message) }` ?\r\nI think it could look better\r\n```ooc\r\nversion(safe)\r\n    raise(this target == null, \"Null target\")\r\n```\r\n@marcusnaslund what do you think ?","created_at":"2016-02-02T10:33:01Z","updated_at":"2016-02-02T10:33:01Z","html_url":"https://github.com/magic-lang/ooc-kean/pull/1295#discussion_r51550692","pull_request_url":"https://api.github.com/repos/magic-lang/ooc-kean/pulls/1295","_links":{"self":{"href":"https://api.github.com/repos/magic-lang/ooc-kean/pulls/comments/51550692"},"html":{"href":"https://github.com/magic-lang/ooc-kean/pull/1295#discussion_r51550692"},"pull_request":{"href":"https://api.github.com/repos/magic-lang/ooc-kean/pulls/1295"}}},"pull_request":{"url":"https://api.github.com/repos/magic-lang/ooc-kean/pulls/1295","id":57811507,"html_url":"https://github.com/magic-lang/ooc-kean/pull/1295","diff_url":"https://github.com/magic-lang/ooc-kean/pull/1295.diff","patch_url":"https://github.com/magic-lang/ooc-kean/pull/1295.patch","issue_url":"https://api.github.com/repos/magic-lang/ooc-kean/issues/1295","number":1295,"state":"open","locked":false,"title":"Destination","user":{"login":"davidpiuva","id":10193545,"avatar_url":"https://avatars.githubusercontent.com/u/10193545?v=3","gravatar_id":"","url":"https://api.github.com/users/davidpiuva","html_url":"https://github.com/davidpiuva","followers_url":"https://api.github.com/users/davidpiuva/followers","following_url":"https://api.github.com/users/davidpiuva/following{/other_user}","gists_url":"https://api.github.com/users/davidpiuva/gists{/gist_id}","starred_url":"https://api.github.com/users/davidpiuva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidpiuva/subscriptions","organizations_url":"https://api.github.com/users/davidpiuva/orgs","repos_url":"https://api.github.com/users/davidpiuva/repos","events_url":"https://api.github.com/users/davidpiuva/events{/privacy}","received_events_url":"https://api.github.com/users/davidpiuva/received_events","type":"User","site_admin":false},"body":"Normalized the internal representation of destination so that the same value can be used for multiple resolutions. You can now set a destination for multiple resolutions at the same time. Viewport is however still stored in pixels because it is just defining a subset of the target.\r\n```ooc\r\n// Create a DrawState with destination and transform for both Y and UV\r\nstate := DrawState new() setDestination(location, frame size) setTransformReference(rotation, frame size)\r\n// Clone and set targets for Y and UV draw calls\r\nstateY := state setTarget(inputImage y)\r\nstateUV := state setTarget(inputImage uv)\r\n// Use the draw states for drawing to Y and UV\r\nstateY setInputImage(result y) draw()\r\nstateUV setInputImage(result uv) draw()\r\n```","created_at":"2016-02-01T08:56:50Z","updated_at":"2016-02-02T10:33:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"34bce07512ae11542f827be9f893fb435d58eb97","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/magic-lang/ooc-kean/pulls/1295/commits","review_comments_url":"https://api.github.com/repos/magic-lang/ooc-kean/pulls/1295/comments","review_comment_url":"https://api.github.com/repos/magic-lang/ooc-kean/pulls/comments{/number}","comments_url":"https://api.github.com/repos/magic-lang/ooc-kean/issues/1295/comments","statuses_url":"https://api.github.com/repos/magic-lang/ooc-kean/statuses/f2908a55ed944a9a05be6b05cef9111fdadda224","head":{"label":"davidpiuva:destination","ref":"destination","sha":"f2908a55ed944a9a05be6b05cef9111fdadda224","user":{"login":"davidpiuva","id":10193545,"avatar_url":"https://avatars.githubusercontent.com/u/10193545?v=3","gravatar_id":"","url":"https://api.github.com/users/davidpiuva","html_url":"https://github.com/davidpiuva","followers_url":"https://api.github.com/users/davidpiuva/followers","following_url":"https://api.github.com/users/davidpiuva/following{/other_user}","gists_url":"https://api.github.com/users/davidpiuva/gists{/gist_id}","starred_url":"https://api.github.com/users/davidpiuva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidpiuva/subscriptions","organizations_url":"https://api.github.com/users/davidpiuva/orgs","repos_url":"https://api.github.com/users/davidpiuva/repos","events_url":"https://api.github.com/users/davidpiuva/events{/privacy}","received_events_url":"https://api.github.com/users/davidpiuva/received_events","type":"User","site_admin":false},"repo":{"id":28035938,"name":"ooc-kean","full_name":"davidpiuva/ooc-kean","owner":{"login":"davidpiuva","id":10193545,"avatar_url":"https://avatars.githubusercontent.com/u/10193545?v=3","gravatar_id":"","url":"https://api.github.com/users/davidpiuva","html_url":"https://github.com/davidpiuva","followers_url":"https://api.github.com/users/davidpiuva/followers","following_url":"https://api.github.com/users/davidpiuva/following{/other_user}","gists_url":"https://api.github.com/users/davidpiuva/gists{/gist_id}","starred_url":"https://api.github.com/users/davidpiuva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidpiuva/subscriptions","organizations_url":"https://api.github.com/users/davidpiuva/orgs","repos_url":"https://api.github.com/users/davidpiuva/repos","events_url":"https://api.github.com/users/davidpiuva/events{/privacy}","received_events_url":"https://api.github.com/users/davidpiuva/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/davidpiuva/ooc-kean","description":"OOC port of parts of Kean.","fork":true,"url":"https://api.github.com/repos/davidpiuva/ooc-kean","forks_url":"https://api.github.com/repos/davidpiuva/ooc-kean/forks","keys_url":"https://api.github.com/repos/davidpiuva/ooc-kean/keys{/key_id}","collaborators_url":"https://api.github.com/repos/davidpiuva/ooc-kean/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/davidpiuva/ooc-kean/teams","hooks_url":"https://api.github.com/repos/davidpiuva/ooc-kean/hooks","issue_events_url":"https://api.github.com/repos/davidpiuva/ooc-kean/issues/events{/number}","events_url":"https://api.github.com/repos/davidpiuva/ooc-kean/events","assignees_url":"https://api.github.com/repos/davidpiuva/ooc-kean/assignees{/user}","branches_url":"https://api.github.com/repos/davidpiuva/ooc-kean/branches{/branch}","tags_url":"https://api.github.com/repos/davidpiuva/ooc-kean/tags","blobs_url":"https://api.github.com/repos/davidpiuva/ooc-kean/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/davidpiuva/ooc-kean/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/davidpiuva/ooc-kean/git/refs{/sha}","trees_url":"https://api.github.com/repos/davidpiuva/ooc-kean/git/trees{/sha}","statuses_url":"https://api.github.com/repos/davidpiuva/ooc-kean/statuses/{sha}","languages_url":"https://api.github.com/repos/davidpiuva/ooc-kean/languages","stargazers_url":"https://api.github.com/repos/davidpiuva/ooc-kean/stargazers","contributors_url":"https://api.github.com/repos/davidpiuva/ooc-kean/contributors","subscribers_url":"https://api.github.com/repos/davidpiuva/ooc-kean/subscribers","subscription_url":"https://api.github.com/repos/davidpiuva/ooc-kean/subscription","commits_url":"https://api.github.com/repos/davidpiuva/ooc-kean/commits{/sha}","git_commits_url":"https://api.github.com/repos/davidpiuva/ooc-kean/git/commits{/sha}","comments_url":"https://api.github.com/repos/davidpiuva/ooc-kean/comments{/number}","issue_comment_url":"https://api.github.com/repos/davidpiuva/ooc-kean/issues/comments{/number}","contents_url":"https://api.github.com/repos/davidpiuva/ooc-kean/contents/{+path}","compare_url":"https://api.github.com/repos/davidpiuva/ooc-kean/compare/{base}...{head}","merges_url":"https://api.github.com/repos/davidpiuva/ooc-kean/merges","archive_url":"https://api.github.com/repos/davidpiuva/ooc-kean/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/davidpiuva/ooc-kean/downloads","issues_url":"https://api.github.com/repos/davidpiuva/ooc-kean/issues{/number}","pulls_url":"https://api.github.com/repos/davidpiuva/ooc-kean/pulls{/number}","milestones_url":"https://api.github.com/repos/davidpiuva/ooc-kean/milestones{/number}","notifications_url":"https://api.github.com/repos/davidpiuva/ooc-kean/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/davidpiuva/ooc-kean/labels{/name}","releases_url":"https://api.github.com/repos/davidpiuva/ooc-kean/releases{/id}","deployments_url":"https://api.github.com/repos/davidpiuva/ooc-kean/deployments","created_at":"2014-12-15T12:34:56Z","updated_at":"2016-01-21T11:50:29Z","pushed_at":"2016-02-02T10:26:56Z","git_url":"git://github.com/davidpiuva/ooc-kean.git","ssh_url":"git@github.com:davidpiuva/ooc-kean.git","clone_url":"https://github.com/davidpiuva/ooc-kean.git","svn_url":"https://github.com/davidpiuva/ooc-kean","homepage":null,"size":30370,"stargazers_count":0,"watchers_count":0,"language":"ooc","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":"master"}},"base":{"label":"magic-lang:master","ref":"master","sha":"f04e59d4195b6f9ed412bdf72c622f88ea619bb7","user":{"login":"magic-lang","id":16756691,"avatar_url":"https://avatars.githubusercontent.com/u/16756691?v=3","gravatar_id":"","url":"https://api.github.com/users/magic-lang","html_url":"https://github.com/magic-lang","followers_url":"https://api.github.com/users/magic-lang/followers","following_url":"https://api.github.com/users/magic-lang/following{/other_user}","gists_url":"https://api.github.com/users/magic-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/magic-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magic-lang/subscriptions","organizations_url":"https://api.github.com/users/magic-lang/orgs","repos_url":"https://api.github.com/users/magic-lang/repos","events_url":"https://api.github.com/users/magic-lang/events{/privacy}","received_events_url":"https://api.github.com/users/magic-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":25256330,"name":"ooc-kean","full_name":"magic-lang/ooc-kean","owner":{"login":"magic-lang","id":16756691,"avatar_url":"https://avatars.githubusercontent.com/u/16756691?v=3","gravatar_id":"","url":"https://api.github.com/users/magic-lang","html_url":"https://github.com/magic-lang","followers_url":"https://api.github.com/users/magic-lang/followers","following_url":"https://api.github.com/users/magic-lang/following{/other_user}","gists_url":"https://api.github.com/users/magic-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/magic-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magic-lang/subscriptions","organizations_url":"https://api.github.com/users/magic-lang/orgs","repos_url":"https://api.github.com/users/magic-lang/repos","events_url":"https://api.github.com/users/magic-lang/events{/privacy}","received_events_url":"https://api.github.com/users/magic-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/magic-lang/ooc-kean","description":"ooc port of parts of Kean.","fork":false,"url":"https://api.github.com/repos/magic-lang/ooc-kean","forks_url":"https://api.github.com/repos/magic-lang/ooc-kean/forks","keys_url":"https://api.github.com/repos/magic-lang/ooc-kean/keys{/key_id}","collaborators_url":"https://api.github.com/repos/magic-lang/ooc-kean/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/magic-lang/ooc-kean/teams","hooks_url":"https://api.github.com/repos/magic-lang/ooc-kean/hooks","issue_events_url":"https://api.github.com/repos/magic-lang/ooc-kean/issues/events{/number}","events_url":"https://api.github.com/repos/magic-lang/ooc-kean/events","assignees_url":"https://api.github.com/repos/magic-lang/ooc-kean/assignees{/user}","branches_url":"https://api.github.com/repos/magic-lang/ooc-kean/branches{/branch}","tags_url":"https://api.github.com/repos/magic-lang/ooc-kean/tags","blobs_url":"https://api.github.com/repos/magic-lang/ooc-kean/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/magic-lang/ooc-kean/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/magic-lang/ooc-kean/git/refs{/sha}","trees_url":"https://api.github.com/repos/magic-lang/ooc-kean/git/trees{/sha}","statuses_url":"https://api.github.com/repos/magic-lang/ooc-kean/statuses/{sha}","languages_url":"https://api.github.com/repos/magic-lang/ooc-kean/languages","stargazers_url":"https://api.github.com/repos/magic-lang/ooc-kean/stargazers","contributors_url":"https://api.github.com/repos/magic-lang/ooc-kean/contributors","subscribers_url":"https://api.github.com/repos/magic-lang/ooc-kean/subscribers","subscription_url":"https://api.github.com/repos/magic-lang/ooc-kean/subscription","commits_url":"https://api.github.com/repos/magic-lang/ooc-kean/commits{/sha}","git_commits_url":"https://api.github.com/repos/magic-lang/ooc-kean/git/commits{/sha}","comments_url":"https://api.github.com/repos/magic-lang/ooc-kean/comments{/number}","issue_comment_url":"https://api.github.com/repos/magic-lang/ooc-kean/issues/comments{/number}","contents_url":"https://api.github.com/repos/magic-lang/ooc-kean/contents/{+path}","compare_url":"https://api.github.com/repos/magic-lang/ooc-kean/compare/{base}...{head}","merges_url":"https://api.github.com/repos/magic-lang/ooc-kean/merges","archive_url":"https://api.github.com/repos/magic-lang/ooc-kean/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/magic-lang/ooc-kean/downloads","issues_url":"https://api.github.com/repos/magic-lang/ooc-kean/issues{/number}","pulls_url":"https://api.github.com/repos/magic-lang/ooc-kean/pulls{/number}","milestones_url":"https://api.github.com/repos/magic-lang/ooc-kean/milestones{/number}","notifications_url":"https://api.github.com/repos/magic-lang/ooc-kean/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/magic-lang/ooc-kean/labels{/name}","releases_url":"https://api.github.com/repos/magic-lang/ooc-kean/releases{/id}","deployments_url":"https://api.github.com/repos/magic-lang/ooc-kean/deployments","created_at":"2014-10-15T13:42:17Z","updated_at":"2016-01-21T11:50:29Z","pushed_at":"2016-02-02T10:26:57Z","git_url":"git://github.com/magic-lang/ooc-kean.git","ssh_url":"git@github.com:magic-lang/ooc-kean.git","clone_url":"https://github.com/magic-lang/ooc-kean.git","svn_url":"https://github.com/magic-lang/ooc-kean","homepage":"","size":30896,"stargazers_count":3,"watchers_count":3,"language":"ooc","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":50,"forks":19,"open_issues":50,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/magic-lang/ooc-kean/pulls/1295"},"html":{"href":"https://github.com/magic-lang/ooc-kean/pull/1295"},"issue":{"href":"https://api.github.com/repos/magic-lang/ooc-kean/issues/1295"},"comments":{"href":"https://api.github.com/repos/magic-lang/ooc-kean/issues/1295/comments"},"review_comments":{"href":"https://api.github.com/repos/magic-lang/ooc-kean/pulls/1295/comments"},"review_comment":{"href":"https://api.github.com/repos/magic-lang/ooc-kean/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/magic-lang/ooc-kean/pulls/1295/commits"},"statuses":{"href":"https://api.github.com/repos/magic-lang/ooc-kean/statuses/f2908a55ed944a9a05be6b05cef9111fdadda224"}}}}