Seperate the two anti aliasing hints in the config.

This commit is contained in:
Jan Philipp Timme 2014-11-28 20:09:07 +01:00
parent 35301b0d27
commit 96f03c5cda
2 changed files with 10 additions and 3 deletions

View File

@ -159,8 +159,10 @@ public class GameFrame extends JFrame {
* KEY_ANTIALIASING is very expensive and doesn't do much more over KEY_TEXT_ANTIALIASING * KEY_ANTIALIASING is very expensive and doesn't do much more over KEY_TEXT_ANTIALIASING
*/ */
private void applyRenderingHints(Graphics2D bufferedGraphics) { private void applyRenderingHints(Graphics2D bufferedGraphics) {
if(GameConfig.antialiasing == true) { if(GameConfig.key_antialiasing == true) {
bufferedGraphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); bufferedGraphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
}
if(GameConfig.text_antialiasing == true) {
bufferedGraphics.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); bufferedGraphics.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
} }
} }

View File

@ -26,9 +26,14 @@ public class GameConfig {
public static String windowTitle = "SpaceScooter!"; public static String windowTitle = "SpaceScooter!";
/** /**
* Whether or not anti aliasing rendering hints will be used. * Whether or not anti aliasing will be used for shapes.
*/ */
public static boolean antialiasing = false; public static boolean key_antialiasing = false;
/**
* Whether or not to apply anti aliasing on text.
*/
public static boolean text_antialiasing = false;
/** /**