svg circle with fixed radius

D

dimstthomas

Hello

Anyone know how to make an svg circle radius fixed (i.e. not affected
by transforms)? I tried adding px or cm, e.g. r='15px' but it just
generates an error.

Thanks
 
M

Martin Honnen

Anyone know how to make an svg circle radius fixed (i.e. not affected
by transforms)? I tried adding px or cm, e.g. r='15px' but it just
generates an error.

Are you using any script at all or why do you ask here?
Which SVG viewer are you using and what kind of error do you get for
r="15px"?
The value of r is a length
<http://www.w3.org/TR/SVG11/types.html#DataTypeLength>
so a number plus a unit should not be any problem.
 
D

dimstthomas

Thanks for your reply

Why do I ask here? Because there doesn't seem to be any (active) SVG
groups and a google groups search shows that this group is active and
has had quite a lot of SVG questions answered.

I am writing ASP pages that have some javascript, but not for the SVG
part!

Turns out the error was in the ASP part, but when I fixed that I get
the circles displayed but the radius is still affected by the
transform.

e.g. for a 1100 by 700 svg image

<svg>
<g transform='scale(0.102592799850774,0.241129865656218)
translate(-24234,-1604)'>
<circle cx='25957' cy='2036' r='30px' stroke='black' stroke-width='2'
fill='red'/>
<circle cx='27332' cy='2770' r='30px' stroke='black' stroke-width='2'
fill='red'/>
<circle cx='34956' cy='1732' r='30px' stroke='black' stroke-width='2'
fill='red'/>
</g>
</svg>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top