I don't no if anyone experiences this problem, but I really want an Image.drawCentered method. Currently, when drawing my character, I have to divide its width/height by 2, and then use that as the render position. I do this quite alot throughout my code, and others probably do too. I was wondering if I could implement an Image.drawCentered function.
Example:
Code:
/**
Draws the image at it's center
@author liamzebedee
@param x The x co-ordinate to draw the [centered] image at
@param y The y co-ordinate to draw the [centered] image at
*/
public void drawCentered(float x, float y) {
this.draw(x - (this.getWidth() / 2), y - (this.getHeight() / 2));
}
_________________
Liam (liamzebedee) Edwards-Playne
Cryptum