So, I was annoyed by how the HUD for my GameState was very pixel-ated and I wanted to change that through the use of anti-aliasing. However, it works with a small exception:
It adds all these lines to the HUD, which is not what I want at all, is there a way to prevent this from occurring?
Here's what it looked like before anti-aliasing:
Also, here's the code:
public void render(GameContainer container, StateBasedGame game, Graphics graphics) throws SlickException {
graphics.setAntiAlias(true);
renderOverlayGui(graphics);
renderGui(graphics);
graphics.setAntiAlias(false);
renderIcons(graphics);
}
private void renderIcons (Graphics graphics) {
graphics.drawImage(imgHeart, this.radius - 4, 1);
graphics.drawImage(imgCoolDown, this.radius - 4, 18);
}
private void renderGui (Graphics graphics) {
graphics.setColor(GameColour.brown);
graphics.fill(guiCircle);
graphics.fill(guiBox);
}
private void renderOverlayGui (Graphics graphics) {
graphics.setColor(Color.black);
graphics.fill(guiOverlayCircle);
graphics.fill(guiOverlayBox);
}