Examples of OMSVGTextElement


Examples of org.vectomatic.dom.svg.OMSVGTextElement

    Coord endPoint = GraphUtilities.extractFinalCoord(
        line.getAttribute("d"));
    Coord startPoint = GraphUtilities.extractStartCoord(
        line.getAttribute("d"));
   
    OMSVGTextElement text = OMSVGParser.currentDocument(
        ).createSVGTextElement(
            endPoint.x,
            endPoint.y -5.0f, //TODO: Check if other text here and move
            OMSVGLength.SVG_LENGTHTYPE_PX,
            getPipeInfoString(pipelineInfo));
   
    text.getStyle().setSVGProperty(
        SVGConstants.CSS_FILL_PROPERTY,
        SVGConstants.CSS_RED_VALUE);
    text.getStyle().setSVGProperty(
        SVGConstants.CSS_TEXT_ANCHOR_PROPERTY, "middle");
    text.getStyle().setSVGProperty(
        SVGConstants.CSS_FONT_SIZE_PROPERTY, "8pt");
   
    OMElement par = (OMElement) line.getParentNode();
    OMNodeList<OMElement> oldText = par.getElementsByTagName("text");
    if (oldText.getLength() > 0) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.