Examples of SVGOMEllipseElement


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

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

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

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

            // 'rx' attribute - required
            float rx = ee.getRx().getAnimVal().getValue();

            // 'ry' attribute - required
            float ry = ee.getRy().getAnimVal().getValue();

            shapeNode.setShape(new Ellipse2D.Float(cx - rx, cy - ry,
                                                   rx * 2, ry * 2));
        } catch (LiveAttributeException ex) {
            throw new BridgeException(ctx, ex);
View Full Code Here

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

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

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

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

            // 'rx' attribute - required
            AbstractSVGAnimatedLength _rx =
                (AbstractSVGAnimatedLength) ee.getRx();
            float rx = _rx.getCheckedValue();

            // 'ry' attribute - required
            AbstractSVGAnimatedLength _ry =
                (AbstractSVGAnimatedLength) ee.getRy();
            float ry = _ry.getCheckedValue();

            shapeNode.setShape(new Ellipse2D.Float(cx - rx, cy - ry,
                                                   rx * 2, ry * 2));
        } catch (LiveAttributeException ex) {
View Full Code Here

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

        }catch(Exception e){
          logger.error(e.getMessage());
        }
        returnComp = comp;
      }else if (gfxElem instanceof SVGOMEllipseElement){
        SVGOMEllipseElement ellipseElem = (SVGOMEllipseElement)gfxElem;
        float cx = ellipseElem.getCx().getBaseVal().getValue();
        float cy = ellipseElem.getCy().getBaseVal().getValue();
        float r  = ellipseElem.getRx().getBaseVal().getValue();
        float r2 = ellipseElem.getRy().getBaseVal().getValue();
       
        Vertex middlePoint = new Vertex(cx,cy,0);
        //Apply transformation, transform centerpoint and the radii
        try{
          middlePoint.transform(currentLocalTransformMatrix);
View Full Code Here

Examples of org.apache.flex.forks.batik.dom.svg.SVGOMEllipseElement

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

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

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

            // 'rx' attribute - required
            AbstractSVGAnimatedLength _rx =
                (AbstractSVGAnimatedLength) ee.getRx();
            float rx = _rx.getCheckedValue();

            // 'ry' attribute - required
            AbstractSVGAnimatedLength _ry =
                (AbstractSVGAnimatedLength) ee.getRy();
            float ry = _ry.getCheckedValue();

            shapeNode.setShape(new Ellipse2D.Float(cx - rx, cy - ry,
                                                   rx * 2, ry * 2));
        } catch (LiveAttributeException ex) {
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.