W3C home > Mailing lists > Public > www-svg@w3.org > March 2004

Re: Correct behavior of "visibility" tag

From: ruben Tech <rubentech2000@yahoo.com>
Date: Thu, 4 Mar 2004 09:28:11 -0800 (PST)
Message-ID: <20040304172811.32565.qmail@web20728.mail.yahoo.com>
To: www-svg@w3.org
If anybody can provide some info that would very helpful. Following was my question in the previous post
 
From SVG spec ( http://www.w3.org/TR/SVG11/painting.html#VisibilityControl ) 
 
"Setting 'visibility' to hidden on a 'g' will make its children invisible as long as the children do not specify their own 'visibility' properties as visible. 
Note that 'visibility' is not an inheritable property. "
 
According to the first line --- if on a "g" element we specify "hidden" it makes its children invisible, if children don't specify any visiblity property. Adobe player behaves that way, is that the correct behavior according to spec?
 
According to the second line -- Visibiliby does not get inherited down the children from parent, unless children set the visibility to "inherit". See Chris Lilley's response below. 
 
Second line does seem to contradict the first line.
 
For example, in the following cases, 
case 1: rectangle is visible eventhough the parent group is invisible because the rectangle sets the visiblity flag to "visible". 
case 2: Adobe svg player does not show the rectangle at all, that means the rectangle does inherit the visibility from parent "g" element(in adobe player). But according to Chris Lilley's explanation and the second sentence of the above SVG spec quotation, rectangle shouldn't inherit visibility from the parent "g" element. 
            However the frist sentence of the above SVG spec quotation, if we specify visibility flag "hidden" in the group element then it's children would be invisible unless children overrides the visibility flag with "visible"
 
Could anybody explain? What should be the standard behavior?
 
1) 
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" baseProfile="tiny" xml:space="preserve" width="176" height="208" viewBox="-88 -104 176 208">
 
 <g visibility="hidden">
 
  <rect x="-80" y="-20" width="160" height="40" fill="#666699" visibility="visible">
        <animateTransform attributeName="transform" type="rotate" values="0;180" dur="6s" repeatDur="indefinite"/>
    
  </rect>
  
 </g>
</svg>
 
 
2)
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" baseProfile="tiny" xml:space="preserve" width="176" height="208" viewBox="-88 -104 176 208">
 
 <g visibility="hidden">
 
  <rect x="-80" y="-20" width="160" height="40" fill="#666699">
        <animateTransform attributeName="transform" type="rotate" values="0;180" dur="6s" repeatDur="indefinite"/>
    
  </rect>
  
 </g>
 
</svg>



---------------------------------
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster.
Received on Thursday, 4 March 2004 12:28:12 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:26 GMT