示例#1
0
  @Override
  public void paint(Graphics2D g, double timestamp) {
    super.paint(g);

    Point2D p = getPosition(timestamp);
    double x = p.getX() - position.getX();
    double y = p.getY() - position.getY();
    g.translate(x, y);

    double angle = getOrientation(timestamp) - orientation;
    g.rotate(angle);

    paintGauge(g);
  }
示例#2
0
 @Override
 public void paintUnscaled(Graphics2D g, double timestamp) {
   if (timestamp == 0d) {
     super.paintUnscaled(g);
   }
 }