I am trying an example from 
http://xmlgraphics.apache.org/batik/using/dom-api.html#buildsvgdoc
http://xmlgraphics.apache.org/batik/using/dom-api.html#buildsvgdoc  but
modify it with this:

 rectangle1.setAttributeNS(null, "x", "0");
 rectangle1.setAttributeNS(null, "y", "0");
 rectangle1.setAttributeNS(null, "width", "100");
 rectangle1.setAttributeNS(null, "height", "100");
 rectangle1.setAttributeNS(null, "fill", "red");
 Element rectangle2 = doc.createElementNS(svgNS, "rect");
 rectangle2.setAttributeNS(null, "x", "30");
 rectangle2.setAttributeNS(null, "y", "30");
 rectangle2.setAttributeNS(null, "width", "40");
 rectangle2.setAttributeNS(null, "height", "40");
 rectangle2.setAttributeNS(null, "fill", "blue");

 rectangle1.appendChild(rectangle2);

 svgRoot.appendChild(rectangle1);     


 Then i place the document into the JSVGCanvas which is added to a JFrame.
 I expected, that i would see a blue rectangle over and inside the red
rectangle,
 but see only red one.

 What am i doing wrong?


--
View this message in context: 
http://batik.2283329.n4.nabble.com/Nested-Nodes-tp4393178p4393178.html
Sent from the Batik - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org

Reply via email to