{"action":"created","issue":{"url":"https://api.github.com/repos/Dgame/Dgame/issues/38","labels_url":"https://api.github.com/repos/Dgame/Dgame/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/Dgame/Dgame/issues/38/comments","events_url":"https://api.github.com/repos/Dgame/Dgame/issues/38/events","html_url":"https://github.com/Dgame/Dgame/pull/38","id":71682369,"number":38,"title":"Fixing Surface","user":{"login":"kr41","id":961059,"avatar_url":"https://avatars.githubusercontent.com/u/961059?v=3","gravatar_id":"","url":"https://api.github.com/users/kr41","html_url":"https://github.com/kr41","followers_url":"https://api.github.com/users/kr41/followers","following_url":"https://api.github.com/users/kr41/following{/other_user}","gists_url":"https://api.github.com/users/kr41/gists{/gist_id}","starred_url":"https://api.github.com/users/kr41/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kr41/subscriptions","organizations_url":"https://api.github.com/users/kr41/orgs","repos_url":"https://api.github.com/users/kr41/repos","events_url":"https://api.github.com/users/kr41/events{/privacy}","received_events_url":"https://api.github.com/users/kr41/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":31,"created_at":"2015-04-28T19:39:19Z","updated_at":"2015-04-29T09:13:58Z","closed_at":"2015-04-28T20:29:46Z","pull_request":{"url":"https://api.github.com/repos/Dgame/Dgame/pulls/38","html_url":"https://github.com/Dgame/Dgame/pull/38","diff_url":"https://github.com/Dgame/Dgame/pull/38.diff","patch_url":"https://github.com/Dgame/Dgame/pull/38.patch"},"body":"It fixes Surface.fill() method and Surface color masks.\r\n\r\nThe following code doesn't work without fixing type of `col` argument of `fill()` method (changed from `Color` to `Color4b`). And it creates white PNG-file instead of transparent one without fixing masks.\r\n\r\n```d\r\nSurface test = Surface(64, 64);\r\ntest.fill(Color4b.White.withTransparency(0));\r\ntest.saveToFile(\"test.png\");\r\n```"},"comment":{"url":"https://api.github.com/repos/Dgame/Dgame/issues/comments/97365085","html_url":"https://github.com/Dgame/Dgame/pull/38#issuecomment-97365085","issue_url":"https://api.github.com/repos/Dgame/Dgame/issues/38","id":97365085,"user":{"login":"Dgame","id":2406877,"avatar_url":"https://avatars.githubusercontent.com/u/2406877?v=3","gravatar_id":"","url":"https://api.github.com/users/Dgame","html_url":"https://github.com/Dgame","followers_url":"https://api.github.com/users/Dgame/followers","following_url":"https://api.github.com/users/Dgame/following{/other_user}","gists_url":"https://api.github.com/users/Dgame/gists{/gist_id}","starred_url":"https://api.github.com/users/Dgame/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dgame/subscriptions","organizations_url":"https://api.github.com/users/Dgame/orgs","repos_url":"https://api.github.com/users/Dgame/repos","events_url":"https://api.github.com/users/Dgame/events{/privacy}","received_events_url":"https://api.github.com/users/Dgame/received_events","type":"User","site_admin":false},"created_at":"2015-04-29T09:13:58Z","updated_at":"2015-04-29T09:13:58Z","body":"@kr41 3784d98f8f8823301bced71b1ef139ab98d67c33 Could you also test it if it works as it should? \r\n\r\nInteresting fact: the SDL logo only works if you use \r\n```d\r\nMasks.Zero\r\n```\r\n with a depth of 32 bit, but not if you use \r\n```d\r\nMasks(0x0f00, 0x00f0, 0x000f, 0xf000)\r\n```\r\nwith a depth of 16 like they do here: https://wiki.libsdl.org/SDL_SetWindowIcon\r\n\r\n> It also would be great to add ability to pass mask struct to toHex() method of Color4b. So that the method will return packed value according to the passed mask.\r\n\r\nI'll leave that to you, if you really want that. I see (currently) no big win."}}