Hello,
I'm sorry if you find I'm a pain in the neck... but I would like to
understand. I try to use Batik to create (from values obtained from a html
form) an SGV document. I want to create the element :
<text xml:space="preserve" x="10" y="40" style="stroke:none;">Value from
the html form</text>

Up to now, I found 2 solutions :
 - using a graphics2D :
SVGGraphics2D svgGraphics = new SVGGraphics2D(document);
float x=10,y=20;
svgGraphics.drawString("Salut "+nom+" "+prenom+"!",x,y);
...
Then SVGGraphics2D is converted to SVG.

 - using the DOM implementation
Element svgRoot = document.getDocumentElement();
Element texteElmt = document.createElementNS(svgNS, "text");
...
Then attributes are added, but by hand...

Here is the point : is there something like TextElement texte1 = new
TextElement("name",x,y,"Arial",12pt,...) ?

That is to say, is there classes that can create an object?
And then, apply object.method like texte1.getBBox()?

Does anyone see what I mean?
Regards,
Laurent


> Laurent FALLET schrieb:
>
>>I'm just short because I don't know well Batik, I've no problem in
>> generating the svg, but in putting elements inside (as a matter of
>> fact, a text element). Is there a tutorial of Batik somewhere? I found
>> this one : http://xml.apache.org/batik/svggen.html but it's abour
>> SVGGraphics2D.
>>
>>
>>
>
> I suspect you're looking more for tutorials on SVG itself rather than
> Batik:
>
> 1.)  Check the SVG 1.1 Spec on the text element here:
> http://www.w3.org/TR/SVG11/text.html
>
> 2.)  Also, I would look at the right-hand menu of
> http://www.w3.org/Graphics/SVG/.
> In the Articles, Books, and Links sections--you will probably find
> something you can use.
>
> Glen
>
>
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-- 
Laurent FALLET  -  [EMAIL PROTECTED]
Elève-ingénieur à l'INSA de Rouen  -  http://asi.insa-rouen.fr/~lfallet/



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to