- From: Jiri Klement <jiri.klement@gmail.com>
- Date: Wed, 13 Aug 2008 19:25:46 +0200
- To: www-svg@w3.org, "Dr. Olaf Hoffmann" <Dr.O.Hoffmann@gmx.de>
My interpretation is the same as yours for this example. But lets have width and height in symbol: ... <symbol id="x" viewBox="-30 20 110 700" width="200" height="220" preserveAspectRatio="none" fill="blue" ...> ... </symbol> ... <use xlink:href="#x" x="100" y="140" fill="red" .../> Specification says 'use' is replaced by deep copy of 'symbol' with 'symbol' replaced by 'svg'. If you copy 'symbol' attributes as well, then the result is exactly the same as if width and height was in 'use' instead of 'symbol' <g transform="translate(100,140)" fill="red" ...> <svg id="x" viewBox="-30 20 110 700" preserveAspectRatio="none" width="200" height="220" fill="blue" ...> ... </svg> </g> On Wed, Aug 13, 2008 at 5:34 PM, Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de> wrote: > Am Mittwoch, 13. August 2008 14:45 geschrieben: >> I think firefox and batik use width and height in 'symbol' as default >> value for width and height in 'use', so it makes some sense. Also >> documentation about referencing 'symbol' with 'use' is a bit unclear. >> It says 'symbol' is deep cloned into generated tree, with exception >> that 'symbol' is replaced with 'svg'. It might give an impression than >> 'symbol' attributes are cloned as well. >> > > As far as I understand this, having this example: > > > ... > <symbol id="x" viewBox="-30 20 110 700" preserveAspectRatio="none" > fill="blue" ...> > > ... > </symbol> > > ... > <use xlink:href="#x" x="100" y="140" width="200" height="220" fill="red" .../> > > ... > > > > This is rendered like (apart from the problem, that this cannot really be > replaced multiple times because of the id-Attribute in a real document): > > <g transform="translate(100,140)" fill="red" ...> > > <svg id="x" viewBox="-30 20 110 700" preserveAspectRatio="none" > width="200" height="220" fill="blue" ...> > > ... > </svg> > > </g> > > ... > > What is your interpretation? > > > >
Received on Wednesday, 13 August 2008 17:26:22 UTC