- From: Stephane Conversy <conversy@emn.fr>
- Date: Tue, 06 Feb 2001 15:52:35 +0100
- To: Christophe Jolif <cjolif@ilog.fr>
- CC: svg-testsuite-comments@w3.org, www-svg@w3.org
right. So, in the second "circle into circle" we have: <g transform="translate(15, 65) scale(2)"> <!-- Draw marker using user space units --> <circle cx="7.5" cy="7.5" r="2.5" style="fill:black"/> <!-- Draw marker using percentages: 7.5 = 1.667% of 450 --> <circle cx="1.667%" cy="1.667%" r=".3333%" style="fill:red"/> </g> Notice the radius of .3333%. Now, to match the first example, the radius of the red circle should eventually give "3". The radius is computed with respect to the length of the diagonal of the viewport, here it's sqrt(450*450) which is about 636. Given that we have a scale of 2, if we want a radius of 3, we should set the radius to 1.5 (as in the first example) which is about .2358% of the diagonal, not .3333%. Am I right ? stef Christophe Jolif wrote: > Stephane, > > Stephane Conversy wrote: > > > > Hello. > > > > I still don't get how to deal with absolute and relative values. > > in coords-unitsProc-BE-04.svg, we have: > > > > <g transform="translate(15, 45) scale(2)"> > > <!-- Draw marker using user space units --> > > <circle cx="7.5" cy="7.5" r="2.5" > > style="fill:black"/> > > <!-- Draw CSS marker using px units --> > > <circle cx="7.5px" cy="7.5px" r="1.5px" > > style="fill:red"/> > > </g> > > > > is cx (7.5px) in the red circle affected by the scale(2) transform in > > the > > parent group ? > > Yes it is. Both user space units and css units are modified by > transformations. > -- stephane conversy ecole des mines de nantes
Received on Tuesday, 6 February 2001 09:52:34 UTC