Holger Will wrote:
> set the width/height to 100% and use  viewBox .
> (you wont need preserveAspectRatio since "xMidYMid" is the default 
> value, but you should at least try a value of "none")
> like this:
> <svg width="100%" height="100%" viewBox="0 0 1000 600" 
> preserveAspectRatio="xMidYMid" xmlns="http://www.w3.org/2000/svg";>
> </svg>
> 
> p.s.: the xmlns is required by some userAgents, so allways include it.
> 
> tbone58x wrote:
>> I written some programs to generate SVG output and am always using the
>> followng lines of code:
>>
>> <svg width="1000" height="600">
>> <rect x="0" y="0" width="1000" height="600" style="fill:khaki"/>
>>
>> So if I want to center <TEXT in the middle of screen down 100 pixels
>> (I always use Pixels) I would use <TEXT x="500" y="100"
>> style="text-anchor:middle;">Text Goes here </text>
>>
>> However, what happens when someone has either a very large or small
>> resolution?  I am not using a web server, just generating SVG code
>> once a day that can be seen by clicking on a link.  That is the SVG is
>> not being generated on the fly on each hit.
>>
>> Is there a better way to more fully utilize the screen size of the end
>> user?  Hope this makes sense and that I can gain some insights as to
>> handle what must be a very common issue.

And of course, your code must be written as follow:
<rect x="0" y="0" width="100%" height="100%" style="fill:khaki"/>
<text x="50%" y="100" style="text-anchor:middle;">Text Goes here</text>

Use "<text", not "<TEXT", of course.

-- 
Philippe Lhoste
--  (near) Paris -- France
--  Professional programmer and amateur artist
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --


------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/1U_rlB/TM
--------------------------------------------------------------------~-> 

-----
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/
 



Reply via email to