Package org.apache.batik.dom.svg

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


     */
    protected void buildShape(BridgeContext ctx,
                              Element e,
                              ShapeNode shapeNode) {
        try {
            SVGOMCircleElement ce = (SVGOMCircleElement) e;

            // 'cx' attribute - default is 0
            float cx = ce.getCx().getAnimVal().getValue();

            // 'cy' attribute - default is 0
            float cy = ce.getCy().getAnimVal().getValue();

            // 'r' attribute - required
            float r = ce.getR().getAnimVal().getValue();

            float x = cx - r;
            float y = cy - r;
            float w = r * 2;
            shapeNode.setShape(new Ellipse2D.Float(x, y, w, w));
View Full Code Here


     */
    protected void buildShape(BridgeContext ctx,
                              Element e,
                              ShapeNode shapeNode) {
        try {
            SVGOMCircleElement ce = (SVGOMCircleElement) e;

            // 'cx' attribute - default is 0
            AbstractSVGAnimatedLength _cx =
                (AbstractSVGAnimatedLength) ce.getCx();
            float cx = _cx.getCheckedValue();

            // 'cy' attribute - default is 0
            AbstractSVGAnimatedLength _cy =
                (AbstractSVGAnimatedLength) ce.getCy();
            float cy = _cy.getCheckedValue();

            // 'r' attribute - required
            AbstractSVGAnimatedLength _r =
                (AbstractSVGAnimatedLength) ce.getR();
            float r = _r.getCheckedValue();

            float x = cx - r;
            float y = cy - r;
            float w = r * 2;
 
View Full Code Here

//        r*=2;
//        r2*=2;
        MTEllipse comp = new MTEllipse(pa, middlePoint, r, r2);
        returnComp = comp;
      }else if (gfxElem instanceof SVGOMCircleElement){
        SVGOMCircleElement circleElem = (SVGOMCircleElement)gfxElem;
        float cx = circleElem.getCx().getBaseVal().getValue();
        float cy = circleElem.getCy().getBaseVal().getValue();
        float r = circleElem.getR().getBaseVal().getValue();
        float r2 = circleElem.getR().getBaseVal().getValue();
       
        Vertex middlePoint = new Vertex(cx,cy,0);
        //Apply transformation, transform centerpoint and the radii
        try{
          middlePoint.transform(currentLocalTransformMatrix);
View Full Code Here

TOP

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

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.