{"issue":{"state":"closed","pull_request":{"diff_url":"https://github.com/lojjic/PIE/pull/127.diff","html_url":"https://github.com/lojjic/PIE/pull/127","patch_url":"https://github.com/lojjic/PIE/pull/127.patch"},"milestone":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/c461fb30aeac4d17e0f3ad2863e70d21?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"c461fb30aeac4d17e0f3ad2863e70d21","url":"https://api.github.com/users/digitalagua","login":"digitalagua","id":329830},"labels":[],"assignee":null,"updated_at":"2011-11-15T21:28:36Z","comments":7,"closed_at":"2011-11-13T20:52:05Z","url":"https://api.github.com/repos/lojjic/PIE/issues/127","body":"Hey Jason,\n\nAfter much trial and error, I figured got the opacity2 working. It is uber buggy. \n\nOverview:\nApparently if fill['opacity2'] is set it will take on the value of fill['opacity'] and then proceed to display at full alpha. fill['opacity2'] appears to be set when the #Default#VML behavior is added to a fill. \n\nIn order to get it to work you must set the fill['o:opacity2'] before the behavior is set. \n\nChange 1:\nWhat I did is separate out the s['behavior'] = 'url(#default#VML)'; from getShape and put it into a new function applyBehavior. I had getShape call applyBehavior for anything that wasn't a fill. If it was a fill I called the applyBehavior after all the styles attributes had been set.\n\nhttps://github.com/digitalagua/PIE/blob/master/sources/RendererBase.js - Line 138, Line 145\n\nThis is why the other features aren't working. The applyBehavior is either not being called or it is being called at the wrong time. I honestly don't know if this is the best approach, but it works well for the linear gradients. \n\nChange 2:\nThe other buggy piece is when the gradient itself is being set. \n\nhttps://github.com/digitalagua/PIE/blob/master/sources/BackgroundRenderer.js Lines 365-376\n\nIf there are three or more stops IE switchs the starting point for opacity and o:opacity2, because that obviously makes perfect sense.\n\nPossible Change:\nI experemented with your vmlColors array. In the documentation it looks like you only need mid points not 0 and 1. I did it both ways and the gradients changed slightly, but not enough to notice.\n\nhttps://github.com/digitalagua/PIE/blob/master/sources/BackgroundRenderer.js Line 351\n\nYou might try this instead:\n// Convert to percentage along the VML gradient line and add to the VML 'colors' value\n        // first and last values are removed for the colors array\n        for( i = 1; i < stopCount-1; i++ ) {\n            vmlColors.push(\n                ( vmlOffsetPct + ( stopPx[ i ] / vmlGradientLength * 100 ) ) + '% ' + stops[i].color.colorValue( el )\n            );\n        }\n\nAll Other Changes:\nThe other changes were trying to get the other features to work. \n\nAll that I added was they applyBehavior where I thought appropriate, but I ran out of my allotted time.\n\nsources/BackgroundRenderer.js\nsources/BorderRenderer.js\nsources/BoxShadowOutsetRenderer.js\nsources/ImgRenderer.js\nsources/RendererBase.js\n\nOh yeah and I added a couple of files to make navigating the test files easier.\ntests/index.html\ntests/toc.html\n\nFeel free to use any of the code or ideas. If you do use it, all I ask for is a credit.\n\nFeel free to drop me an email with any questions or if you want to bounce ideas for integrating this with other pieces of the PIE. Ha.\n\nThanks,\n\nJames Butler\nDigital Agua","html_url":"https://github.com/lojjic/PIE/issues/127","title":"Gradient Transparency","number":127,"id":715539,"created_at":"2011-03-29T20:51:32Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/c461fb30aeac4d17e0f3ad2863e70d21?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"c461fb30aeac4d17e0f3ad2863e70d21","url":"https://api.github.com/users/digitalagua","login":"digitalagua","id":329830},"updated_at":"2011-11-15T21:28:36Z","url":"https://api.github.com/repos/lojjic/PIE/issues/comments/2751617","body":"Hey Jason,\r\n\r\nCongrats on the new son. Is he your first?\r\n\r\nOur son is 17 months. It is a blast. We are looking to have another sometime soon.\r\n\r\nAnyway talk to you then.\r\n\r\nJames\r\n\r\nJames Butler\r\njames@digitalagua.com\r\n\r\ndigital agua\r\no: 415.431.2482 x 7\r\nm: 415.385.5470\r\nf: 415.449.3522\r\n\r\nFrom: Jason Johnston <reply@reply.github.com<mailto:reply@reply.github.com>>\r\nDate: Tue, 15 Nov 2011 13:23:14 -0800\r\nTo: James <james@digitalagua.com<mailto:james@digitalagua.com>>\r\nSubject: Re: [PIE] Gradient Transparency (#127)\r\n\r\nCool, give me a shout when your time frees up. It's very likely that I won't have time to get to this before then (our baby boy is due to be born in 3 weeks!)\r\n\r\n---\r\nReply to this email directly or view it on GitHub:\r\nhttps://github.com/lojjic/PIE/pull/127#issuecomment-2751545","id":2751617,"created_at":"2011-11-15T21:28:36Z"}}