--- In [email protected], "Thomas Steiner"
<[EMAIL PROTECTED]> wrote:
>
> Hi,
> I'd  like to create an SVG file where some attributes are given by a
> free settable number (which might be the value of some function).
> Let me give a very simple example:
> In the SVG file below the radius of the circles should be the value of
> say exp(value), where "value" can be set somewhere once in the svg
> file
> 
> <?xml version="1.0" standalone="no"?>
> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
> "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";>
> 
> <svg width="100%" height="100%" version="1.1"
> xmlns="http://www.w3.org/2000/svg";>
> 
> <circle cx="100" cy="50" r="40" stroke="black"
> stroke-width="2" fill="red"/>
> 
> <circle cx="200" cy="50" r="30" stroke="black"
> stroke-width="2" fill="blue"/>
> 
> </svg>
>

Thomas,

If you want to set a value once so that it can be used repeatedly
through the svg, for example if you want a large number of circles the
same radius and you want to be able to change that radius by editing a
single figure, you could define the circle once and repeat it with the
<use ... /> element, or you could define the radius in a CSS class and
make all the circles members of the class.

But I don't think that is what you want to do. By 'free settable
number' I think you mean a 'variable'. Unfortunately you cannot have
variables in SVG (or XML generally, for that matter). However, you can
modify the SVG using Javascript. You could build a script into the SVG
file that will calculate a radius and apply it to whichever elements
you want. This is quite a big step up from plain SVG.  
 


------------------------------------

-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
----Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/svg-developers/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to