[whatwg] rename CanvasPixelArray

Ian Hickson ian at hixie.ch
Thu Apr 30 16:10:19 PDT 2009


On Fri, 23 Jan 2009, Anne van Kesteren wrote:
>
> Wouldn't it make more sense to give this a more generic name, just like 
> the object it is associated with? That way we can later reuse it for 
> <img> elements and the like (if we want) without it having to look silly 
> and poorly thought out like the rest of the platform. :-P (E.g. 
> ImagePixelArray.)

On Fri, 23 Jan 2009, Calogero Alex Baldacchino wrote:
> 
> Other elements would need a rendering context anyway, thus the same 
> reasoning could be applied to CanvasRenderingContext2D, CanvasGradient 
> and CanvasPattern. Perhaps the best way to generalize their name is to 
> remove the "Canvas" part (or changing it into "Graphics" or the alike -- 
> both PixelArray and ImagePixelArray could be fine). However, "canvas" 
> might be enough generic, when thinking to a graphics context, to be 
> referred to whatever object allowing custom rendering without any 
> confusion or poor association (like saying that a <canvas> is the main 
> element for custom/dynamic rendering and that other elements might use 
> the Canvas framework to provide similar capabilities). Personally, I'm 
> fine with both choices.

I haven't renamed it. I don't think it's a big deal to introduce other 
interfaces that look the same but with different names, if we need to.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


More information about the whatwg mailing list