Package org.apache.batik.dom.svg

Examples of org.apache.batik.dom.svg.SVGOMLineElement


    protected void buildShape(BridgeContext ctx,
                              Element e,
                              ShapeNode shapeNode) {

        try {
            SVGOMLineElement le = (SVGOMLineElement) e;

            // 'x1' attribute - default is 0
            float x1 = le.getX1().getAnimVal().getValue();

            // 'y1' attribute - default is 0
            float y1 = le.getY1().getAnimVal().getValue();

            // 'x2' attribute - default is 0
            float x2 = le.getX2().getAnimVal().getValue();

            // 'y2' attribute - default is 0
            float y2 = le.getY2().getAnimVal().getValue();

            shapeNode.setShape(new Line2D.Float(x1, y1, x2, y2));
        } catch (LiveAttributeException ex) {
            throw new BridgeException(ctx, ex);
        }
View Full Code Here


    protected void buildShape(BridgeContext ctx,
                              Element e,
                              ShapeNode shapeNode) {

        try {
            SVGOMLineElement le = (SVGOMLineElement) e;

            // 'x1' attribute - default is 0
            AbstractSVGAnimatedLength _x1 =
                (AbstractSVGAnimatedLength) le.getX1();
            float x1 = _x1.getCheckedValue();

            // 'y1' attribute - default is 0
            AbstractSVGAnimatedLength _y1 =
                (AbstractSVGAnimatedLength) le.getY1();
            float y1 = _y1.getCheckedValue();

            // 'x2' attribute - default is 0
            AbstractSVGAnimatedLength _x2 =
                (AbstractSVGAnimatedLength) le.getX2();
            float x2 = _x2.getCheckedValue();

            // 'y2' attribute - default is 0
            AbstractSVGAnimatedLength _y2 =
                (AbstractSVGAnimatedLength) le.getY2();
            float y2 = _y2.getCheckedValue();

            shapeNode.setShape(new Line2D.Float(x1, y1, x2, y2));
        } catch (LiveAttributeException ex) {
            throw new BridgeException(ctx, ex);
View Full Code Here

//        r*=2;
//        r2*=2;
        MTEllipse comp = new MTEllipse(pa, middlePoint, r, r2);
        returnComp = comp;
      }else if (gfxElem instanceof SVGOMLineElement){
        SVGOMLineElement line = (SVGOMLineElement)gfxElem;
        float x1 = line.getX1().getBaseVal().getValue();
        float y1 = line.getY1().getBaseVal().getValue();
        float x2 = line.getX2().getBaseVal().getValue();
        float y2 = line.getY2().getBaseVal().getValue();
        //logger.debug("Line x1: " + x1 + ",y1:" + y1 + ",x2:" + x2 + ",y2:" + y2);
       
        MTLine comp = new MTLine(pa, x1,y1 ,x2,y2);
      
        try{
View Full Code Here

TOP

Related Classes of org.apache.batik.dom.svg.SVGOMLineElement

Copyright © 2018 www.massapicom. 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.