Gornova/MarteEngine — Issue #68: TextEntity scale
Author: Pericuelo
Created: 2011-11-16 19:33:22+00:00
State: open

Hi!

The TextEntity class doesn't use the "scale" attr to render like the Entity class does.

I think that the solution is just copying part of the Entity render method:

```
public void render(GameContainer container, Graphics g)
throws SlickException {
if (font == null) {
font = container.getDefaultFont();
this.calculateHitBox();
}
g.setFont(font);
if (text != null) {
if (scale != 1.0f) {
if (centered)
g.translate(xpos - (w * scale - w), ypos - (h * scale - h));
else
g.translate(xpos, ypos);
g.scale(scale, scale);
g.drawString(text, 0, 0);
} else
g.drawString(text, xpos, ypos);
if (scale != 1.0f)
g.resetTransform();
}
}
```

Hope it helps!