W3C home > Mailing lists > Public > www-svg@w3.org > February 2004

Re: Newbie question - Grouping of objects?

From: juman <juman@chello.se>
Date: Mon, 2 Feb 2004 17:43:19 +0100
To: Carlo Andreoli <barbetto80@hotmail.com>
Cc: www-svg@w3.org
Message-ID: <20040202164319.GR5686@c213-89-200-180.cm-upc.chello.se>

Well yes this is what I want to do... I want to create an object (for
example a square) with some attributes (height, width, color etc) and
then reuse that object but with diffrent scalings and if possible with
diffrent colors.

Say for example I want to draw a chessboard with pieces. Can I then
create a piece (a horse for example) and then draw it four times on the
board (two white, and two black) and to illustrate the piece been taken
of the board draw it in a smaller size on the side of the board.

In you example you use Javascript to do the actual groupings of objects
but is it possible to do the same thing in 'pure' SVG?

Regards,

juman

On Mon, Feb 02, 2004 at 05:03:45PM +0100, Carlo Andreoli wrote:
>    i don't know if i fully understand your problem...it'snot completely
>    clear...but try this:
>    (language use JavaScipt)
> 
>    .........
>    g = svgDocument.createElement("g");
>    g2 = svgDocument.createElement("g");
> 
Received on Monday, 2 February 2004 11:45:00 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:26 GMT