package org.apache.tuscany.sca.impl.artifacts; import org.w3c.dom.Document; import org.w3c.dom.Element; public class Text { public static Element addTextElement(Document document, String svgNs, int x, int y, String content) { Element text = document.createElementNS(svgNs, "text"); text.setAttributeNS(null, "x", x+""); text.setAttributeNS(null, "y", y+""); text.setAttributeNS(null, "text-anchor", "middle"); text.setAttributeNS(null, "dominant-baseline", "mathematical"); text.setAttributeNS(null, "font-size", "20"); text.setTextContent(content); return text; } }