Package com.kitfox.svg.pathcmd

Examples of com.kitfox.svg.pathcmd.Arc


                    double x1 = parser.getCurrentPoint().getX();
                    double y1 = parser.getCurrentPoint().getY();
                    parser.getCurrentPoint().setLocation(   Double.parseDouble(parser.getParams()[i+5]),
                                                            Double.parseDouble(parser.getParams()[i+6]));

                    (new Arc()).arcToparser.getPath(),
                                        (float) xRadius, (float) yRadius,
                                        (float) rotation,
                                        largeArcFlag, sweepFlag,
                                        (float) parser.getCurrentPoint().getX(), (float) parser.getCurrentPoint().getY(),
                                        (float) x1, (float) y1);
                }

                parser.setLastControlPointC(null);
                parser.setLastControlPointQ(null);
            }
        });
       
        commands.put("a", new PathCommand(){
            public void perform(PathParser parser){
                for(int i = 1; parser.getParams().length - i >= 7; i+= 7){
                    double xRadius = Math.abs(Double.parseDouble(parser.getParams()[i]));
                    double yRadius = Math.abs(Double.parseDouble(parser.getParams()[i+1]));
                    double rotation = Double.parseDouble(parser.getParams()[i+2]);
                    boolean largeArcFlag = Double.parseDouble(parser.getParams()[i+3]) != 0;
                    boolean sweepFlag = Double.parseDouble(parser.getParams()[i+4]) != 0;
                    double x1 = parser.getCurrentPoint().getX();
                    double y1 = parser.getCurrentPoint().getY();
                    parser.getCurrentPoint().setLocation(   parser.getCurrentPoint().getX() + Double.parseDouble(parser.getParams()[i+5]),
                                                            parser.getCurrentPoint().getY() + Double.parseDouble(parser.getParams()[i+6]));

                    (new Arc()).arcToparser.getPath(),
                                        (float) xRadius, (float) yRadius,
                                        (float) rotation,
                                        largeArcFlag, sweepFlag,
                                        (float) parser.getCurrentPoint().getX(), (float) parser.getCurrentPoint().getY(),
                                        (float) x1, (float) y1);
View Full Code Here


                    break;
                case 'v':
                    cmd = new Vertical(true, nextFloat(tokens));
                    break;
                case 'A':
                    cmd = new Arc(false, nextFloat(tokens), nextFloat(tokens),
                        nextFloat(tokens),
                        nextFloat(tokens) == 1f, nextFloat(tokens) == 1f,
                        nextFloat(tokens), nextFloat(tokens));
                    break;
                case 'a':
                    cmd = new Arc(true, nextFloat(tokens), nextFloat(tokens),
                        nextFloat(tokens),
                        nextFloat(tokens) == 1f, nextFloat(tokens) == 1f,
                        nextFloat(tokens), nextFloat(tokens));
                    break;
                case 'Q':
View Full Code Here

TOP

Related Classes of com.kitfox.svg.pathcmd.Arc

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.