Package es.iiia.shapegrammar.shape

Examples of es.iiia.shapegrammar.shape.ShapeModel.translate()


        // resize graphics
        ShapeModel newShape = shape.clone();
        newShape.moveToCenter();
        newShape.scale(resize, resize);
        // now move it to centre of the icon
        newShape.translate(iconSize / 2, iconSize  / 2);
               
       
        for (LineModel line : newShape.getLines()) {
          for (int i=0; i<line.getPoints().size()-1; i++) {
            drawLine(e.gc, line.getPoints().get(i), line.getPoints().get(i+1));
View Full Code Here


   
    Rectangle2D modelBounds = wholeModel.getBounds();
   
    // now move to 0,0
    if (modelBounds.getMinX() < 0) {
      wholeModel.translate(-modelBounds.getMinX(), 0);
    }
    if (modelBounds.getMinY() < 0) {
      wholeModel.translate(0, -modelBounds.getMinY());
    }
   
View Full Code Here

    // now move to 0,0
    if (modelBounds.getMinX() < 0) {
      wholeModel.translate(-modelBounds.getMinX(), 0);
    }
    if (modelBounds.getMinY() < 0) {
      wholeModel.translate(0, -modelBounds.getMinY());
    }
   
    grammar.setCurrentFileName(fileName);
    grammar.save();
  }
View Full Code Here

        // resize graphics
        ShapeModel newShape = shape.clone();
        newShape.moveToCenter();
        newShape.scale(resize, resize);
        // now move it to centre of the icon
        newShape.translate(iconSize / 2, iconSize  / 2);
               
       
        for (LineModel line : newShape.getLines()) {
          for (int i=0; i<line.getPoints().size()-1; i++) {
            drawLine(e.gc, line.getPoints().get(i), line.getPoints().get(i+1));
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.