I guess your best shot is to convert the SVG path to java shape or look under org.apache.batik.bridge for SVGPathElementBridge
then you could simple use shape.getCenterX() and shape.getCenterY() also you could then use getLineMetrics if I remember correctly to find the font size information. but remember that adding the text object is an XML task. Alaa jon321 wrote: > > I have a complex svg file that draws a map with various areas. I want to > programmatically label these areas using batik. Ideally what I want to do > is put a text label in the center of the area. > So say I have a path drawing this shape, how do I get the center of it and > apply a text label to it? > thanks. > -- View this message in context: http://www.nabble.com/Text-IN-a-path-tf4697788.html#a13462063 Sent from the Batik - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
