Package tikzmodel

Examples of tikzmodel.TikzPath


    for(Object o : pic.getList()) {
     
     
      if(o instanceof TikzPath) {
       
        TikzPath path = (TikzPath) o;
       
        for(TikzFigure fig : path.getFigures()) {
         
          if(fig instanceof TikzRectangle) {
            figures.add(new FigureRectangle((TikzRectangle) fig));
          } else if(fig instanceof TikzCircle) {
            figures.add(new FigureCircle((TikzCircle) fig));
View Full Code Here


    p("parsePath()");
   
    /*
     * Locals
     */
    TikzPath path = null;
    ArrayList<TikzFigure>  figures  = new ArrayList<TikzFigure>();
    ArrayList<Object>    tokens  = new ArrayList<Object>();
   
   
    /*
     * Check path trigger \
     */
    if(skipChar() != TikzPath.PATH_TRIGGER) {
      throw new TikzParserException(TikzPath.PATH_TRIGGER +" expected");
    }
   
   
    /*
     * Read path type (i.e. draw)
     */
    TikzPathType pt = readPathType();
    tokens.add(pt);
    p("PathType gelesen");
    tokens.add(readWhitespaces());
    p("whitespaces nach PathType gelesen");


    /*
     * Read parameters (i.e. [color=blue,fill=white])
     */
    TikzParameters pathParams = null;
    try {
      pathParams = parseParameters();
      tokens.add(pathParams);
    } catch(TikzParserException tpe) {}
    p("TikzParameters gelesen");
    tokens.add(readWhitespaces());
   
   
    /*
     * Read first coordinate
     */
    origin = parseCoordinate();
    tokens.add(origin);
   
   
    /*
     * Read path chain (i.e. rectangle (2,4) -- (1,2))
     */
    parsePathChain(tokens,figures);

   
    /*
     * Construct path and return it
     */
    path = new TikzPath(pt, pathParams, figures);
    SyntaxTikzPath stp = new SyntaxTikzPath(path,tokens);
    return stp;
  }
View Full Code Here

TOP

Related Classes of tikzmodel.TikzPath

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.