W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2004

[whatwg] Re: Canvas tag

From: Dave Hyatt <hyatt@apple.com>
Date: Tue, 13 Jul 2004 10:48:33 -0700
Message-ID: <DBB036BC-D4F4-11D8-9030-000A95AE8B18@apple.com>
The various color methods can be overloaded to take CSS colors or to  
take individual rgb components.  That may not have been obvious from  
the code.

dave

On Jul 13, 2004, at 8:18 AM, Erik Arvidsson wrote:

> 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
>
> See  
> http://www.opensource.apple.com/darwinsource/WWDC2004/WebCore-146.1/ 
> khtml/ecma/kjs_html.cpp 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.
>
> erik
>
> 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.
>
>
Received on Tuesday, 13 July 2004 10:48:33 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:35 UTC