Examples of modifyCenter()


Examples of com.googlecode.jumpnevolve.math.Rectangle.modifyCenter()

    long startTime = start.getTime();
    for (int i = 0; i < 1000000; i++) {
      if (rect.doesCollide(rect2)) {
        rect.getCollision(rect2, false, true);
      }
      rect = rect.modifyCenter(rect.getCenter().add(
          new Vector(0, 0.000001f)));
    }
    Date end = new Date();
    long endTime = end.getTime();
    System.out.println("Zeit benötigt: " + (endTime - startTime));
View Full Code Here

Examples of com.googlecode.jumpnevolve.math.Rectangle.modifyCenter()

      font = g.getFont();
    }
    Rectangle rect = (Rectangle) this.getNeededSize();
    Vector center = this.getCenterVector();

    GraphicUtils.fill(g, rect.modifyCenter(center), Color.blue);

    Vector pos = this.parent.getPositionFor(this);
    GraphicUtils.drawString(g, pos.add(2, 0), this.content1);

    float xModifier = g.getFont().getWidth(this.content1);
View Full Code Here

Examples of com.googlecode.jumpnevolve.math.Shape.modifyCenter()

  }

  private void drawBackground(Graphics g) {
    if (this.parentContainer != null) {
      Shape shape = this.getNeededSize();
      shape = shape.modifyCenter(this.parentContainer
          .getPositionFor(this).add(
              new Vector(shape.getXRange(), shape.getYRange())
                  .div(2.0f)));
      GraphicUtils.fill(g, shape, this.backgroundColor);
    }
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.