Thanks Domenico. I'm going to give this a try. Tristan
On 2/24/06, domenico_strazzullo <[EMAIL PROTECTED]> wrote: > > --- In [email protected], "drthmlyons" > <[EMAIL PROTECTED]> wrote: > > > > I'm attempting to create an SVG document where the text in the > > document defines the documents size, rather than a declaration like > > <svg width="450" height="500"... > > > > So that just by changing the text, I get documents of different size. > > Is such a thing possible? > > > > Thanks, > > Tristan > > > > > Hi Tristan, > > Yes, there are several ways, depending on the kind of formatting > you're using. One of the simplest can be: > > myWidth = Math.max(getComputedTextLength() of <text> element's > children array) > > myHeigth = <text> element's children.length * dy (if consistent) + > someExtraRoom > > setAttribute on the svg element > > To be more accurate you would probably take into account other > parameters. > > Domenico > > > > > > > ----- > To unsubscribe send a message to: > [EMAIL PROTECTED] > -or- > visit http://groups.yahoo.com/group/svg-developers and click "edit my > membership" > ---- > > > > SPONSORED LINKS > Xml > format<http://groups.yahoo.com/gads?t=ms&k=Xml+format&w1=Xml+format&w2=Svg&w3=Data&c=3&s=35&.sig=u8RdjEjLCbPTzkUjsFG_JA> > Svg<http://groups.yahoo.com/gads?t=ms&k=Svg&w1=Xml+format&w2=Svg&w3=Data&c=3&s=35&.sig=BrpyGiBcZ6vcQXDJ7ktaiw> > Data<http://groups.yahoo.com/gads?t=ms&k=Data&w1=Xml+format&w2=Svg&w3=Data&c=3&s=35&.sig=CrK_fWaLZ-AZKa5FK8rTGA> > ------------------------------ > YAHOO! GROUPS LINKS > > > - Visit your group > "svg-developers<http://groups.yahoo.com/group/svg-developers>" > on the web. > > - To unsubscribe from this group, send an email to: > [EMAIL PROTECTED]<[EMAIL PROTECTED]> > > - Your use of Yahoo! Groups is subject to the Yahoo! Terms of > Service <http://docs.yahoo.com/info/terms/>. > > > ------------------------------ > [Non-text portions of this message have been removed] ----- 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/ <*> 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/

