Examples of Arc


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

Examples of com.stormbrain.test.client.model.Arc

  }

  public void onMouseDown(MouseDownEvent event) {
    lastMouseDown = new Point(event.getX(), event.getY());
   
    bubble = new Arc(lastMouseDown, 0);
    bubble.showFill(false);
    painter.add(bubble);
   
    mouseMove = canvas.addMouseMoveHandler(this);
  }
View Full Code Here

Examples of ds.moteur.route.cc.elements.Arc

   */
  public boolean addArc(Point centre, double rayon, double angleOrigine, double ouverture, int skip){
    boolean ok = false;
   
    if (elements.size() < positions.size() - 1){
      Arc arc = new Arc(positions.get(indexElement), positions.get(indexElement+1+skip), centre, rayon, angleOrigine, ouverture);
      arc.calculerLongueur();
      this.elements.add(arc);
      ok = true;
      indexElement += (skip+1);
    }
   
View Full Code Here

Examples of ds.moteur.route.cc.elements.Arc

      for (int i = 1; i<positions.size() - 1; i++){
        positions.get(i).transformer(origine.getPositionAbsolue(), origine.getAngle().theta);
      }
      for (LigneElementaire element : elements){
        if (element instanceof Arc){
          Arc arc = (Arc)element;
          arc.transformer(origine.getPositionAbsolue(), origine.getAngle().theta);
        }
      }
    }
  }
View Full Code Here

Examples of ds.moteur.route.cc.elements.Arc

    for(int i=0; i<n2; i++){
      int type = dis.readShort();
      if(type == TypeElement.SEGMENT.ordinal()){
        this.addSegment();
      } else {
        Arc arc = new Arc();
        arc.load(dis);
        int skip = dis.readShort();
        this.addArc(arc.getCentre(), arc.getRayon(), arc.getAngleOrigine(), arc.getOuverture(), skip);
      }
    }
  }
View Full Code Here

Examples of ds.moteur.route.cc.elements.Arc

    //Sauvegarde des lignes �l�mentaires
    dos.writeShort(elements.size());
    for (LigneElementaire element : elements){
      element.save(dos);
      if(element instanceof Arc){
        Arc arc = (Arc)element;
        int skip = positions.indexOf(arc.getP2()) - positions.indexOf(arc.getP1()) - 1;
        dos.writeShort(skip);
      }
    }
  }
View Full Code Here

Examples of edu.cmu.sphinx.fst.Arc

        for (int i=0; i<numStates; i++) {
            State olds = fst.getState(i);
            State news = stateMap[olds.getId()];
            int numArcs = olds.getNumArcs();
            for (int j = 0; j < numArcs; j++) {
                Arc olda = olds.getArc(j);
                State next = stateMap[olda.getNextState().getId()];
                Arc newa = new Arc(olda.getIlabel(), olda.getOlabel(),
                        semiring.reverse(olda.getWeight()), news);
                next.addArc(newa);
            }
        }
View Full Code Here

Examples of edu.cmu.sphinx.fst.Arc

            State s = fst.getState(i);
            // Immutable fsts hold an additional (null) arc
            int numArcs = (fst instanceof ImmutableFst) ? s.getNumArcs() - 1: s
                    .getNumArcs();
                for (int j = 0; j < numArcs; j++) {
                Arc a = s.getArc(j);
                if (pType == ProjectType.INPUT) {
                    a.setOlabel(a.getIlabel());
                } else if (pType == ProjectType.OUTPUT) {
                    a.setIlabel(a.getOlabel());
                }
            }
        }
    }
View Full Code Here

Examples of edu.cmu.sphinx.fst.Arc

        paths.get(lastPathIndex).add(start);
        if (start.getNumArcs() != 0) {
            int arcCount = 0;
            int numArcs = start.getNumArcs();
            for (int j = 0; j < numArcs; j++) {
                Arc arc = start.getArc(j);
                if ((currentExploredArcs == null)
                        || !currentExploredArcs.contains(arc)) {
                    lastPathIndex = paths.size() - 1;
                    if (arcCount++ > 0) {
                        duplicatePath(lastPathIndex, fst.getStart(), start,
                                paths);
                        lastPathIndex = paths.size() - 1;
                        paths.get(lastPathIndex).add(start);
                    }
                    State next = arc.getNextState();
                    addExploredArc(start.getId(), arc, exploredArcs);
                    // detect self loops
                    if (next.getId() != start.getId()) {
                        depthFirstSearchNext(fst, next, paths, exploredArcs, accessible);
                    }
View Full Code Here

Examples of edu.cmu.sphinx.fst.Arc

            s2 = p.getRight();
            s = stateMap.get(p);
            int numArcs1 = s1.getNumArcs();
            int numArcs2 = s2.getNumArcs();
            for (int i = 0; i < numArcs1; i++) {
                Arc a1 = s1.getArc(i);
                for (int j = 0; j < numArcs2; j++) {
                    Arc a2 = s2.getArc(j);
                    if (sorted && a1.getOlabel() < a2.getIlabel())
                        break;
                    if (a1.getOlabel() == a2.getIlabel()) {
                        State nextState1 = a1.getNextState();
                        State nextState2 = a2.getNextState();
                        Pair<State, State> nextPair = new Pair<State, State>(
                                nextState1, nextState2);
                        State nextState = stateMap.get(nextPair);
                        if (nextState == null) {
                            nextState = new State(semiring.times(
                                    nextState1.getFinalWeight(),
                                    nextState2.getFinalWeight()));
                            res.addState(nextState);
                            stateMap.put(nextPair, nextState);
                            queue.add(nextPair);
                        }
                        Arc a = new Arc(a1.getIlabel(), a2.getOlabel(),
                                semiring.times(a1.getWeight(), a2.getWeight()),
                                nextState);
                        s.addArc(a);
                    }
                }
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.