[whatwg] Re: Canvas tag

Erik Arvidsson erik at eae.net
Tue Jul 13 08:18:55 PDT 2004

After some digging in the webcore source files online at 
http://www.opensource.apple.com/darwinsource/WWDC2004/WebCore-146.1/ I 
found the following methods on the Context2D object which you get from 
the canvas element

save                     Arguments 0
restore                  Arguments 0
scale                    Arguments 2
rotate                   Arguments 2
translate                Arguments 1
beginPath                Arguments 0
closePath                Arguments 0
setStrokeColor           Arguments 1
setFillColor             Arguments 1
setLineWidth             Arguments 1
setLineCap               Arguments 1
setLineJoin              Arguments 1
setMiterLimit            Arguments 1
fillPath                 Arguments 0
strokePath               Arguments 0
moveToPoint              Arguments 2
addLineToPoint           Arguments 2
addQuadraticCurveToPoint Arguments 4
addBezierCurveToPoint    Arguments 6
addArcToPoint            Arguments 5
addArc                   Arguments 6
addRect                  Arguments 4
clip                     Arguments 0
clearRect                Arguments 4
fillRect                 Arguments 4
strokeRect               Arguments 4
drawImage                Arguments 6
drawImageFromRect        Arguments 10
setShadow                Arguments 3
clearShadow              Arguments 0
setAlpha                 Arguments 1
setCompositeOperation    Arguments 1

for complete source code.

This looks pretty good and seems very useful. One thing that struck me 
as wrong was that the colors could not be provided as HSB which is 
supported by CSS3 so it would make sense to allow that as well.


Malcolm Rowe wrote:
  > There's not been any discussion of <canvas> yet, though there has been
> on <input type=range>. What David said on his weblog was:
> "We are willing to discuss these elements in an open forum like the 
> WHAT-WG. You can see our proposal for canvas and for the new form 
> controls, since we released the complete source of these extensions in 
> WebCore-146, and anyone can download it to view the current APIs."
> I imagine that if you can get hold of 'WebCore-146' (whatever that is), 
> you'll be able to find what you're looking for.
> It is entirely possible, of course, that David has 'submitted' <canvas> 
> privately to the WHATWG members (of which he's one himself, as it 
> happens), but I'd suggest that that is pretty unlikely.

More information about the whatwg mailing list