{"action":"created","issue":{"url":"https://api.github.com/repos/pixijs/pixi.js/issues/2443","repository_url":"https://api.github.com/repos/pixijs/pixi.js","labels_url":"https://api.github.com/repos/pixijs/pixi.js/issues/2443/labels{/name}","comments_url":"https://api.github.com/repos/pixijs/pixi.js/issues/2443/comments","events_url":"https://api.github.com/repos/pixijs/pixi.js/issues/2443/events","html_url":"https://github.com/pixijs/pixi.js/issues/2443","id":145455628,"number":2443,"title":"is it possible to specify alpha transparency when setting a mask object to PIXI.Graphics?","user":{"login":"mreinstein","id":718067,"avatar_url":"https://avatars.githubusercontent.com/u/718067?v=3","gravatar_id":"","url":"https://api.github.com/users/mreinstein","html_url":"https://github.com/mreinstein","followers_url":"https://api.github.com/users/mreinstein/followers","following_url":"https://api.github.com/users/mreinstein/following{/other_user}","gists_url":"https://api.github.com/users/mreinstein/gists{/gist_id}","starred_url":"https://api.github.com/users/mreinstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mreinstein/subscriptions","organizations_url":"https://api.github.com/users/mreinstein/orgs","repos_url":"https://api.github.com/users/mreinstein/repos","events_url":"https://api.github.com/users/mreinstein/events{/privacy}","received_events_url":"https://api.github.com/users/mreinstein/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-03T05:15:16Z","updated_at":"2016-04-03T16:29:15Z","closed_at":null,"body":"I have a PIXI.Graphics object which I'm using as a mask. I draw to the graphics object as such:\r\n\r\n```\r\np = []\r\nfor pt in intersections\r\n  p.push(new PIXI.Point(pt.x, pt.y))\r\n\r\ng = new PIXI.Graphics()\r\ng.clear()\r\ng.beginFill(0x0, 0.5)\r\ng.drawPolygon(p)\r\ng.endFill()\r\n```\r\n\r\nany value I set for alpha transparency (0.5, 1.0, omitted, etc) always draws the pixels at full opacity. Am I doing something wrong, or is mask alpha only supported for sprite based masks?"},"comment":{"url":"https://api.github.com/repos/pixijs/pixi.js/issues/comments/205007139","html_url":"https://github.com/pixijs/pixi.js/issues/2443#issuecomment-205007139","issue_url":"https://api.github.com/repos/pixijs/pixi.js/issues/2443","id":205007139,"user":{"login":"englercj","id":944497,"avatar_url":"https://avatars.githubusercontent.com/u/944497?v=3","gravatar_id":"","url":"https://api.github.com/users/englercj","html_url":"https://github.com/englercj","followers_url":"https://api.github.com/users/englercj/followers","following_url":"https://api.github.com/users/englercj/following{/other_user}","gists_url":"https://api.github.com/users/englercj/gists{/gist_id}","starred_url":"https://api.github.com/users/englercj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/englercj/subscriptions","organizations_url":"https://api.github.com/users/englercj/orgs","repos_url":"https://api.github.com/users/englercj/repos","events_url":"https://api.github.com/users/englercj/events{/privacy}","received_events_url":"https://api.github.com/users/englercj/received_events","type":"User","site_admin":false},"created_at":"2016-04-03T16:29:15Z","updated_at":"2016-04-03T16:29:15Z","body":"Pretty sure mask alpha is only supported for sprite masks. The sprite masks use a shader, but the graphics vector masks use the stencil buffer and just \"cut\" the area.\r\n\r\nYou could generate a sprite from the graphics and use that as the mask?"}}