xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas E Deweese <thomas.dewe...@kodak.com>
Subject RE: FW: group elements
Date Wed, 09 Apr 2003 11:32:18 GMT
>>>>> "MvP" == Martijn v/d Pauw <martijn@meteocon.nl> writes:

MvP> Hello,

 

MvP> Can someone tell me what's the best way to put the graphics I
MvP> drawed to SVG in seperate groups. I have seen how to create a new
MvP> Element ( <p id="this">) but how can i paint there.

     I think you mean <g id="this">.  As to how to 'paint' there.  Add
svg graphics primitive children to it:

    var g = document.createElementNS(svgNS, "g");
    g.setAttribute("id", "foo");

    
    var path = document.createElementNS(svgNS, "path");
    path.setAttribute("d", "M 100,100 h100 v100 h-100 z");
    path.setAttribute("fill", "red");
    path.setAttribute("stroke", "blue");
    path.setAttribute("stroke-width", "10");

    g.appendChild(path);

    document.root.appendChild(g);


MvP>  I would like to have this to be able to communicate with the
MvP> groups with javascript methods.

     You can always find your group with:

     document.getElementById("foo"); 

This is the DOM Core binding (where all these methods come from):

     http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html


MvP> Kind regards,

 

MvP> Martijn van der Pauw

 

MvP> Martijn van der Pauw

MvP> internetontwikkelaar

MvP> Meteo Consult B.V.

MvP> telefoon: 0317 399800

MvP> e-mail: <mailto:martijn@weer.nl> martijn@weer.nl

 

MvP>  <http://www.weer.nl> www.weer.nl

MvP>  <http://www.meteo.nl> www.meteo.nl

 

MvP> <html>

MvP> <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html;
MvP> charset=us-ascii">


MvP> <meta name=Generator content="Microsoft Word 10 (filtered)">

MvP> <style> <!-- /* Font Definitions */ @font-face
MvP> {font-family:Verdana; panose-1:2 11 6 4 3 5 4 4 2 4;} /* Style
MvP> Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal
MvP> {margin:0cm; margin-bottom:.0001pt; font-size:12.0pt;
MvP> font-family:"Times New Roman";} a:link, span.MsoHyperlink
MvP> {color:blue; text-decoration:underline;} a:visited,
MvP> span.MsoHyperlinkFollowed {color:purple;
MvP> text-decoration:underline;} span.emailstijl17 {font-family:Arial;
MvP> color:windowtext;} span.EmailStijl19 {font-family:Arial;
MvP> color:navy;} @page Section1 {size:595.3pt 841.9pt; margin:70.85pt
MvP> 70.85pt 70.85pt 70.85pt;} div.Section1 {page:Section1;}
-->
MvP> </style>

MvP> </head>

MvP> <body lang=NL link=blue vlink=purple>

MvP> <div class=Section1>

MvP> <p class=MsoNormal><font size=3 face="Times New Roman"><span
MvP> style='font-size: 12.0pt'>&nbsp;</span></font></p>

MvP> <p class=MsoNormal><font size=2 face=Arial><span
MvP> style='font-size:10.0pt;
MvP> font-family:Arial'>Hello,</span></font></p>

MvP> <p class=MsoNormal><font size=2 face=Arial><span
MvP> style='font-size:10.0pt;
MvP> font-family:Arial'>&nbsp;</span></font></p>

MvP> <p class=MsoNormal><font size=2 face=Arial><span
MvP> style='font-size:10.0pt; font-family:Arial'>Can someone tell me
MvP> what&#8217;s the best way to put the graphics I drawed to SVG in
MvP> seperate groups. I have seen how to create a new Element ( &lt;p
MvP> id=&#8221;this&#8221;&gt;) but how can i paint
MvP> there.</span></font></p>

MvP> <p class=MsoNormal><font size=2 face=Arial><span
MvP> style='font-size:10.0pt; font-family:Arial'>&nbsp;I would like to
MvP> have this to &nbsp;be able to communicate with the groups with
MvP> javascript methods.</span></font></p>

MvP> <p class=MsoNormal><font size=2 face=Arial><span
MvP> style='font-size:10.0pt;
MvP> font-family:Arial'>&nbsp;</span></font></p>

MvP> <p class=MsoNormal><font size=2 face=Arial><span
MvP> style='font-size:10.0pt; font-family:Arial'>Kind
MvP> regards,</span></font></p>

MvP> <p class=MsoNormal><font size=2 face=Arial><span
MvP> style='font-size:10.0pt;
MvP> font-family:Arial'>&nbsp;</span></font></p>

MvP> <p class=MsoNormal><font size=2 face=Arial><span
MvP> style='font-size:10.0pt; font-family:Arial'>Martijn van der
MvP> Pauw</span></font></p>

MvP> <p class=MsoNormal><font size=2 face=Arial><span
MvP> style='font-size:10.0pt;
MvP> font-family:Arial'>&nbsp;</span></font></p>

MvP> <p class=MsoNormal><em><i><font size=1 color="#004080"
MvP> face=Verdana><span
MvP> style='font-size:7.5pt;font-family:Verdana;color:#004080'>Martijn
MvP> van der Pauw</span></font></i></em></p>

MvP> <p class=MsoNormal><em><i><font size=1 color="#004080"
MvP> face=Verdana><span
MvP> style='font-size:7.5pt;font-family:Verdana;color:#004080'>internetontwikkelaar</span></font></i></em></p>

MvP> <p class=MsoNormal><em><i><font size=1 color="#004080"
MvP> face=Verdana><span
MvP> style='font-size:7.5pt;font-family:Verdana;color:#004080'>Meteo
MvP> Consult B.V.</span></font></i></em></p>

MvP> <p class=MsoNormal><em><i><font size=1 color="#004080"
MvP> face=Verdana><span
MvP> style='font-size:7.5pt;font-family:Verdana;color:#004080'>telefoon:
MvP> 0317 399800</span></font></i></em></p>

MvP> <p class=MsoNormal><em><i><font size=1 color="#004080"
MvP> face=Verdana><span
MvP> style='font-size:7.5pt;font-family:Verdana;color:#004080'>e-mail:
MvP> </span></font></i></em><a
MvP> href="mailto:martijn@weer.nl"><em><i><font size=1 color="#004080"
MvP> face=Verdana><span
MvP> style='font-size:7.5pt;font-family:Verdana;color:#004080;text-decoration:none'>martijn@weer.nl</span></font></i></em></a></p>

MvP> <p class=MsoNormal><font size=3 face="Times New Roman"><span
MvP> style='font-size: 12.0pt'>&nbsp;</span></font></p>

MvP> <p class=MsoNormal><font size=1 color="#004080"
MvP> face=Verdana><span
MvP> style='font-size:7.5pt;font-family:Verdana;color:#004080'><a
MvP> href="http://www.weer.nl"><em><i><font color=black
MvP> face=Verdana><span
MvP> style='font-family:Verdana;color:windowtext;text-decoration:none'>www.weer.nl</span></font></i></em></a></span></font></p>

MvP> <p class=MsoNormal><font size=1 color="#004080"
MvP> face=Verdana><span
MvP> style='font-size:7.5pt;font-family:Verdana;color:#004080'><a
MvP> href="http://www.meteo.nl"><em><i><font color=black
MvP> face=Verdana><span
MvP> style='font-family:Verdana;color:windowtext;text-decoration:none'>www.meteo.nl</span></font></i></em></a></span></font></p>

MvP> <p class=MsoNormal><font size=3 face="Times New Roman"><span
MvP> style='font-size: 12.0pt'>&nbsp;</span></font></p>

MvP> </div>

MvP> </body>

MvP> </html>



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Mime
View raw message