Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

cc.LayerGradient is broken in Firefox #610

Closed
ricardoquesada opened this Issue · 5 comments

3 participants

@ricardoquesada

cc.LayerGradient works ok on Chrome and Safari, but it looks really bad in Firefox.

Tested on Firefox 16.0.2, in OS X 10.7.4

How to test it:
Run the Layer Test, and go to the Gradient subtest

@linshun
Owner

Thank you, Riq. Dingping will look into this problem.

@ricardoquesada

So, apparently it is possible to have nice gradients in FF by using createLinearGradient.
If you want to "rotate" it, you have to change the coordinates.
Official documentation: https://developer.mozilla.org/en-US/docs/Canvas_tutorial/Applying_styles_and_colors
Example of "rotated" gradients: http://weblogs.asp.net/dwahlin/archive/2012/06/20/rendering-linear-gradients-using-the-html5-canvas.aspx

CCLayer.js is using createFillRect and I think we have to replace it with createLinearGradient in FF browsers.

@dingpinglv
Collaborator

LayerColor is only one color, so I think using fillRect is better than createLinearGradient.

and Gradient effect by change the coordinates is different to openGL. I will using this way to implement LayerGradient at first, but because this reason, I select other way.

OK, I will using createLinearGradient to implement LayerGradient soon.

@ricardoquesada

Thanks, working correctly on FF now, but there the new approach introduced a new bug.
#622

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.