Package org.newdawn.slick.svg

Examples of org.newdawn.slick.svg.NonGeometricData


   
    StringTokenizer tokens = new StringTokenizer(points, ", ");
    Polygon poly = new Polygon();
    int count = processPoly(poly, element, tokens);
   
    NonGeometricData data = Util.getNonGeometricData(element);
    if (count > 3) {
      Shape shape = poly.transform(transform);
     
      diagram.addFigure(new Figure(Figure.POLYGON, shape, data, transform));
    }
View Full Code Here


    float y = Float.parseFloat(element.getAttribute("y"));
   
    Rectangle rect = new Rectangle(x,y,width,height);
    Shape shape = rect.transform(transform);
   
    NonGeometricData data = Util.getNonGeometricData(element);
    data.addAttribute("width", ""+width);
    data.addAttribute("height", ""+height);
    data.addAttribute("x", ""+x);
    data.addAttribute("y", ""+y);
   
    diagram.addFigure(new Figure(Figure.RECTANGLE, shape, data, transform));
  }
View Full Code Here

   * @return The non-geometric data (i.e. stroke, fill, etc)
   */
  static NonGeometricData getNonGeometricData(Element element) {
    String meta = getMetaData(element);
   
    NonGeometricData data = new NonGeometricData(meta);
    data.addAttribute(NonGeometricData.ID, element.getAttribute("id"));
    data.addAttribute(NonGeometricData.FILL, getStyle(element, NonGeometricData.FILL));
    data.addAttribute(NonGeometricData.STROKE, getStyle(element, NonGeometricData.STROKE));
    data.addAttribute(NonGeometricData.OPACITY, getStyle(element, NonGeometricData.OPACITY));
    data.addAttribute(NonGeometricData.STROKE_DASHARRAY, getStyle(element, NonGeometricData.STROKE_DASHARRAY));
    data.addAttribute(NonGeometricData.STROKE_DASHOFFSET, getStyle(element, NonGeometricData.STROKE_DASHOFFSET));
    data.addAttribute(NonGeometricData.STROKE_MITERLIMIT, getStyle(element, NonGeometricData.STROKE_MITERLIMIT));
    data.addAttribute(NonGeometricData.STROKE_OPACITY, getStyle(element, NonGeometricData.STROKE_OPACITY));
    data.addAttribute(NonGeometricData.STROKE_WIDTH, getStyle(element, NonGeometricData.STROKE_WIDTH));
   
    return data;
  }
View Full Code Here

   
    StringTokenizer tokens = new StringTokenizer(points, ", ");
    Polygon poly = new Polygon();
    int count = processPoly(poly, element, tokens);
   
    NonGeometricData data = Util.getNonGeometricData(element);
    if (count > 3) {
      Shape shape = poly.transform(transform);
     
      diagram.addFigure(new Figure(Figure.POLYGON, shape, data, transform));
    }
View Full Code Here

    float y = Float.parseFloat(element.getAttribute("y"));
   
    Rectangle rect = new Rectangle(x,y,width+1,height+1);
    Shape shape = rect.transform(transform);
   
    NonGeometricData data = Util.getNonGeometricData(element);
    data.addAttribute("width", ""+width);
    data.addAttribute("height", ""+height);
    data.addAttribute("x", ""+x);
    data.addAttribute("y", ""+y);
   
    diagram.addFigure(new Figure(Figure.RECTANGLE, shape, data, transform));
  }
View Full Code Here

    float[] out = new float[4];
   
    transform.transform(in,0,out,0,2);
    Line line = new Line(out[0],out[1],out[2],out[3]);
   
    NonGeometricData data = Util.getNonGeometricData(element);
    data.addAttribute("x1",""+x1);
    data.addAttribute("x2",""+x2);
    data.addAttribute("y1",""+y1);
    data.addAttribute("y2",""+y2);
   
    diagram.addFigure(new Figure(Figure.LINE, line, data, transform));
  }
View Full Code Here

   
    StringTokenizer tokens = new StringTokenizer(points, ", ");
    Polygon poly = new Polygon();
    int count = processPoly(poly, element, tokens);
   
    NonGeometricData data = Util.getNonGeometricData(element);
    if (count > 3) {
      Shape shape = poly.transform(transform);
     
      diagram.addFigure(new Figure(Figure.POLYGON, shape, data, transform));
    }
View Full Code Here

    float y = Float.parseFloat(element.getAttribute("y"));
   
    Rectangle rect = new Rectangle(x,y,width+1,height+1);
    Shape shape = rect.transform(transform);
   
    NonGeometricData data = Util.getNonGeometricData(element);
    data.addAttribute("width", ""+width);
    data.addAttribute("height", ""+height);
    data.addAttribute("x", ""+x);
    data.addAttribute("y", ""+y);
   
    diagram.addFigure(new Figure(Figure.RECTANGLE, shape, data, transform));
  }
View Full Code Here

   * @return The non-geometric data (i.e. stroke, fill, etc)
   */
  static NonGeometricData getNonGeometricData(Element element) {
    String meta = getMetaData(element);
   
    NonGeometricData data = new InkscapeNonGeometricData(meta, element);
    data.addAttribute(NonGeometricData.ID, element.getAttribute("id"));
    data.addAttribute(NonGeometricData.FILL, getStyle(element, NonGeometricData.FILL));
    data.addAttribute(NonGeometricData.STROKE, getStyle(element, NonGeometricData.STROKE));
    data.addAttribute(NonGeometricData.OPACITY, getStyle(element, NonGeometricData.OPACITY));
    data.addAttribute(NonGeometricData.STROKE_DASHARRAY, getStyle(element, NonGeometricData.STROKE_DASHARRAY));
    data.addAttribute(NonGeometricData.STROKE_DASHOFFSET, getStyle(element, NonGeometricData.STROKE_DASHOFFSET));
    data.addAttribute(NonGeometricData.STROKE_MITERLIMIT, getStyle(element, NonGeometricData.STROKE_MITERLIMIT));
    data.addAttribute(NonGeometricData.STROKE_OPACITY, getStyle(element, NonGeometricData.STROKE_OPACITY));
    data.addAttribute(NonGeometricData.STROKE_WIDTH, getStyle(element, NonGeometricData.STROKE_WIDTH));
   
    return data;
  }
View Full Code Here

    float[] out = new float[4];
   
    transform.transform(in,0,out,0,2);
    Line line = new Line(out[0],out[1],out[2],out[3]);
   
    NonGeometricData data = Util.getNonGeometricData(element);
    data.addAttribute("x1",""+x1);
    data.addAttribute("x2",""+x2);
    data.addAttribute("y1",""+y1);
    data.addAttribute("y2",""+y2);
   
    diagram.addFigure(new Figure(Figure.LINE, line, data, transform));
  }
View Full Code Here

TOP

Related Classes of org.newdawn.slick.svg.NonGeometricData

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.