[Bug 19905] HTML5 Canvas Gradient - new idea, "new Canvas"...

https://www.w3.org/Bugs/Public/show_bug.cgi?id=19905

rcabanie <cabanier@adobe.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cabanier@adobe.com

--- Comment #6 from rcabanie <cabanier@adobe.com> ---
(In reply to comment #0)
> I have too many ideas.
> 
> 1. I suggest remove "CanvasGradient" object and add:
> 
>   linear-gradient(
>       [ [ <angle> | to <side-or-corner> ] ,]? 
>       <color-stop>[, <color-stop>]+
>   )
> 
> For "fillStyle" and "strokeStyle".
> For example:
>   ctx.fillStyle = "linear-gradient(to bottom, #ffffff 0%,#e5e5e5 100%)";

CSS gradients only make sense in the box model. For instance, what is "bottom"
for a canvas gradient?
This is too confusing to be useful.

> 
> 2. I suggest new transformations:
>   ctx.transform(String cssTransform);
>   ctx.setTransform(String cssTransform);
> 
> For example:
>   ctx.setTransform("translate(10px) rotate(45deg)");
>   ctx.setTransform("matrix(1, 0, 0, 1, 0, 0)");
> 
> Old:
>   ctx.setTransform(1, 0, 0, 1, 0, 0);

There's active development on a Matrix object that will harmonize transforms
between SVG, canvas, WebGL and CSS. 
It will be less confusing if this new object is integrated in canvas.

> 
> 3. I suggest "Canvas" object:
>   var canvas = new Canvas(100, 100);
>   var ctx = canvas.getContext("2d");
>   ctx.fillRect(0, 0, 100, 100);

What would be the advantage? It seems like you can already do this.

> 
> 4. I suggest new color system:
>   rgba(white, 0.5) instead of rgba(255, 255, 255, 0.5)
>   rgba(#00FF00, 0.5) instead of rgba(0, 255, 0, 0.5)

Canvas takes CSS colors. Maybe it's better to propose that color proposal on
www-style

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Saturday, 2 March 2013 21:44:28 UTC