Jump to content

Canvas 2d Radial Gradient


Pryme8
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...