globalAlpha messing me up

I am attempting to port an existing canvas system to HTML5. You may have heard of it, its called Qt. Qt has a highly-evolved drawing API that I think you should just copy because it's open source, optimized and proven.


1. Anyway, the specific thing that is currently giving my grief is globalAlpha. This should be split into strokeAlpha and fillAlpha. Now because of this lack of separation, I always have to put out the alpha before any stroke or fill command. 
And actually, I'm going to write out all the stroke and fill properties.

2. Additionally I would suggest accepting colors in AARRGGBB format, which would set the alphas accordingly. 


3. The other thing that annoys me is "strokeStyle" actually has no style associated with it. In Qt land, this comes out to be able to specify various dash-dottings. Really, strokeStyle is strokeColor. And the same thing goes for fills.

Received on Thursday, 29 March 2012 08:19:03 UTC