XML Elves

XML Elves

<community>of XML and SVG Developers</community>


setting the opacity attribute of a group

This is a discussion on setting the opacity attribute of a group within the SVG Questions forums, part of the SVG Forums category; Sorry to keep troubling those who have offered their help to me so far. I've got another little niggle which ...


Go Back   XML Elves > SVG Forums > SVG Questions

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Notices


Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-06-2004, 01:46 PM
Anonymous
Guest
 
Posts: n/a
Default setting the opacity attribute of a group

Sorry to keep troubling those who have offered their help to me so far. I've got another little niggle which i know someone here will be able to help. What i want to do is group some objects together and get them *all* to fade (opacity) after a certain length of time. The code i'm using is:

<g id="scenary">

<set attributeType="CSS" attributeName="fill-opacity" to="0" begin="9s"/>

<set attributeType="CSS" attributeName="stroke-opacity" to="0" begin="9s"/>

<path style="fill: yellow; stroke-width: 1; stroke: lightbrown" d="M 0 392 C 16,386 266,376 2,292 z"/>

<path style="fill: brown; fill-opacity:1; stroke-width: 1" d="M 36,218 C 7,236 11,321 20 326 L 37,324 C 36,319 16,237 43,219 z"/>

<path style="fill: green; fill-opacity:1; stroke-width: 1" d="M 41 219 C 52,217 72,222 79,230 C 83,212 71,213 68,213 L 65,217 L 64,216 L 67,212 C 65,212 65,211 62 211 L 60,213 L 60,210 C 52,207 40,216 40,219 z"/>

<path style="fill: green; fill-opacity:1; stroke-width: 1" d="M 40 219 C 28,214 18,217 8,225 C 8,217 19,210 20,211 L 22,213 L 23,210 C 23,208 26,208 28,210 L 28,213 L 30,208 C 40,212 38,217 40,219 z"/>

<rect style="fill: black; fill-opacity:1; stroke-width: 1; stroke: #000000" x="14" y="302" width="6" height="1"/>

<rect style="fill: black; fill-opacity:1; stroke-width: 1; stroke: #000000" x="14" y="297" width="6" height="1"/>

<rect style="fill: black; fill-opacity:1; stroke-width: 1; stroke: #000000" x="14" y="282" width="5" height="1"/>

<rect style="fill: black; fill-opacity:1; stroke-width: 1; stroke: #000000" x="14" y="277" width="5" height="1"/>

</g>

The problem seems to be that it only applies this effect to the 1st object and not the whole group.

Any ideas? I did try having a group outside of the group and putting the animation in but it still only gets applied to the 1st object in the inner group.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-06-2004, 03:42 PM
Anonymous
Guest
 
Posts: n/a
Default Re: setting the opacity attribute of a group

Quote:
Originally Posted by Anonymous
Sorry to keep troubling those who have offered their help to me so far. I've got another little niggle which i know someone here will be able to help. What i want to do is group some objects together and get them *all* to fade (opacity) after a certain length of time. The code i'm using is:

<g id="scenary">

<set attributeType="CSS" attributeName="fill-opacity" to="0" begin="9s"/>

<set attributeType="CSS" attributeName="stroke-opacity" to="0" begin="9s"/>

<path style="fill: yellow; stroke-width: 1; stroke: lightbrown" d="M 0 392 C 16,386 266,376 2,292 z"/>

<path style="fill: brown; fill-opacity:1; stroke-width: 1" d="M 36,218 C 7,236 11,321 20 326 L 37,324 C 36,319 16,237 43,219 z"/>

<path style="fill: green; fill-opacity:1; stroke-width: 1" d="M 41 219 C 52,217 72,222 79,230 C 83,212 71,213 68,213 L 65,217 L 64,216 L 67,212 C 65,212 65,211 62 211 L 60,213 L 60,210 C 52,207 40,216 40,219 z"/>

<path style="fill: green; fill-opacity:1; stroke-width: 1" d="M 40 219 C 28,214 18,217 8,225 C 8,217 19,210 20,211 L 22,213 L 23,210 C 23,208 26,208 28,210 L 28,213 L 30,208 C 40,212 38,217 40,219 z"/>

<rect style="fill: black; fill-opacity:1; stroke-width: 1; stroke: #000000" x="14" y="302" width="6" height="1"/>

<rect style="fill: black; fill-opacity:1; stroke-width: 1; stroke: #000000" x="14" y="297" width="6" height="1"/>

<rect style="fill: black; fill-opacity:1; stroke-width: 1; stroke: #000000" x="14" y="282" width="5" height="1"/>

<rect style="fill: black; fill-opacity:1; stroke-width: 1; stroke: #000000" x="14" y="277" width="5" height="1"/>

</g>

The problem seems to be that it only applies this effect to the 1st object and not the whole group.

Any ideas? I did try having a group outside of the group and putting the animation in but it still only gets applied to the 1st object in the inner group.
Problem come from inheritance of property, you change fill-opacity for group, this apply to childs which HAVE NOT this property as your first object.
Remove fill-opacity from other objects and it will work for all objects in group.

Michel
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-06-2004, 03:54 PM
jon - svg
Guest
 
Posts: n/a
Default setting the opacity attribute of a group

Michel,

You don't have to repost full original post. It makes page too long.
Maybe do something like this:

Quote:
The problem seems to be that it only applies this effect to the 1st object and not the whole group.

Any ideas? I did try having a group outside of the group and putting the animation in but it still only gets applied to the 1st object in the inner group.
Not full text. But, make as you want.
best,

jon
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
attribute, group, opacity, setting


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -6. The time now is 02:18 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0

Ink Cartridges
See how much you can save on ink cartridges.

inkjet ink
Sort out your inkjet with ink. See our range of suppliers, top brands including Epson, HP, Dell, Lexmark, Canon, Brother… Great value!

Hard Disk Drive Data Recovery Lancashire...
Hard disk drive data recovery, from any computer. Click above.

ink cartridges Free UK Delivery on ink cartridges such as Canon, Dell, Epson, hp & Lexmark.

1 2 3 4 5 6 7 8 9 10