Pryme8 Posted October 7, 2016 Share Posted October 7, 2016 I have looked and looked, and cant find any information on making a radial gradient with Canvas 2d, I see the GetGradientColorBrush for the border, but do not see how this would work for a radial. Any playground with this? Quote Link to comment Share on other sites More sharing options...
none-9999 Posted October 7, 2016 Share Posted October 7, 2016 http://www.w3schools.com/tags/canvas_createradialgradient.asp Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted October 7, 2016 Author Share Posted October 7, 2016 Im talking about the BJS Canvas2d Engine... and no a normal canvas element wont work because I need Opacity on the gradient and that's buggy for most browsers still. Thanks though. I ended up using a standard DOM element and some fancy css. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 10, 2016 Share Posted October 10, 2016 Ping @Nockawa Quote Link to comment Share on other sites More sharing options...
Nockawa Posted October 10, 2016 Share Posted October 10, 2016 On 10/7/2016 at 6:09 PM, Pryme8 said: I have looked and looked, and cant find any information on making a radial gradient with Canvas 2d, I see the GetGradientColorBrush for the border, but do not see how this would work for a radial. Any playground with this? GetGradientColorBrush create a linear Gradient brush, not a radial one. I supposed I could have been more precise on the terminology and call it LinearGradientColorBrush, but it's getting long, but it would have been accurate though. So to sum up, only linear so far, but I do accept contribution of a new RadialGradientColorBrush! edit: I just looked at the doc and indeed I never mentioned it's a linear one, well, I assumed at that time it was obvious... Pryme8 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted October 10, 2016 Author Share Posted October 10, 2016 Thank you! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.