Re: Paint keywords

On Thursday, August 25, 2011, 11:46:31 PM, Cameron wrote:

CM> On 26/08/11 3:16 AM, Chris Lilley wrote:
>> (now back from lengthy vacation/convalescence)

CM> (WB!)

(TY)

CM> OK.  I think I misremembered the discussion during Seattle -- it was in
CM> the context of Vector Effects that we were discussing these keywords, 
CM> not SVG Color.  I am definitely in favour of having these in SVG 2 itself.

Right. And as thew wiki page says "While this concept started with vector effects, I believe that its should be generalised and made available throughout SVG2".

CM> We resolved at the F2F to include these keywords in SVG 2:

CM> http://www.w3.org/2011/07/29-svg-minutes.html#item02

CM> Erik has an action to collect all the resolve-to-put-in-SVG-2 items from
CM> recent calls/F2Fs into the wiki, so that should get added soon to the 
CM> table of features and owners in 
CM> http://www.w3.org/Graphics/SVG/WG/wiki/SVG2_Requirements#Feature_Owners.

Okay.

CM> Chris you also have an action to write spec text for the proposal, 
CM> ACTION-3094.  I'm wondering whether that is useful to do at this point
CM> given that we haven't made any progress on writing any SVG 2 spec text yet.

Yes,I was mainly wondering how to go about that concretely (what file to edit, using what markup conventions, etc).

CM> Do you think there is anything more to write up than is in 
CM> http://www.w3.org/Graphics/SVG/WG/wiki/Proposals/Vector_effects to 
CM> define the functionality fully?

The definition (SVG 1.1SE) of 'currentColor' is

currentColor
    Indicates that painting is done using the current animated value of the color specified by the ‘color’ property. This mechanism is provided to facilitate sharing of color attributes between parent grammars such as other (non-SVG) XML. This mechanism allows you to define a style in your HTML which sets the ‘color’ property and then pass that style to the SVG user agent so that your SVG text will draw in the same color.

so that one can just be copied over. The next two are fairly straightforward:

currentFillPaint 
    Indicates that painting is done using the current animated value of the paint specified by the ‘fill’ property. This can be used, for example, to make the stroke use the same paint as the fill.

currentStrokePaint 
    Indicates that painting is done using the current animated value of the paint specified by the ‘stroke’ property. This can be used, for example, to make the fill use the same paint as the stroke.

The next three require some wording taken from the definition of the use element. This wording might change depending on how we choose to explain re-using non-exposed instances of elements (shadow DOM). 


useColor 
 If the element is @instantiated elsewhere in the document tree, this value indicates that painting is done using the animated value of the color specified by the ‘color’ property at the point of instantiation. Otherwise, the current animated value of the color specified by the ‘color’ property.

useFillPaint 
 If the element is @instantiated elsewhere in the document tree, this value indicates that painting is done using the animated value of the  paint specified by the ‘fill’ property at the point of instantiation. Otherwise, the current animated value of the paint specified by the ‘fill’ property.

useStrokePaint 
 If the element is @instantiated elsewhere in the document tree, this value indicates that painting is done using the animated value of the  paint specified by the ‘stroke’ property at the point of instantiation. Otherwise, the current animated value of the paint specified by the ‘stroke’ property.


and point the links (indicated above by @) to the definitions section (not super happy with this definition, but it is a start):

instantiated
  A non-exposed copy of an element is used elsewhere in the rendering tree:
* because of a ‘use’ element 
* when a ‘pattern’ or ‘marker’ element is used
* when a linear or radial gradient is used

Also, as a consequence of adding these values, the wording for markers (section 'Details on how markers are rendered'), patterns, and for symbol and use, and perhaps for 'Inheritance of painting properties', needs to be updated so that the explanations use these new values and terms.

The spec also needs some examples of these (like useStrokepaint for the fill of a marker). 

And tests need to be added for all of the values: on paths, on paths with use, paths inside marker, paths inside pattern, and the values used on gradient stops (any others?)


-- 
 Chris Lilley   Technical Director, Interaction Domain                 
 W3C Graphics Activity Lead, Fonts Activity Lead
 Co-Chair, W3C Hypertext CG
 Member, CSS, WebFonts, SVG Working Groups

Received on Friday, 26 August 2011 14:44:05 UTC