Ejemplo n.º 1
0
  public void paint(Graphics graphics, long time) {
    int xt = x.getInt(time);
    int yt = y.getInt(time);

    double scale_x = scaleX.getDouble(time);
    double scale_y = scaleY.getDouble(time);

    int width = (int) (image.getWidth(null) * scale_x);
    int height = (int) (image.getHeight(null) * scale_y);

    graphics.drawImage(image, xt, yt, width, height, null);
  }
  public Font getFont(long time) {
    float s = (float) size.getDouble(time);

    if (s != cachedSize) {
      cachedSize = s;
      cachedFont = font.deriveFont((float) s);
    }

    return cachedFont;
  }