From 96f03c5cda0a178e3347007a050aad90995efc05 Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Fri, 28 Nov 2014 20:09:07 +0100 Subject: [PATCH] Seperate the two anti aliasing hints in the config. --- src/de/teamteamteam/spacescooter/GameFrame.java | 4 +++- src/de/teamteamteam/spacescooter/brain/GameConfig.java | 9 +++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/de/teamteamteam/spacescooter/GameFrame.java b/src/de/teamteamteam/spacescooter/GameFrame.java index 9143e02..9823aa9 100644 --- a/src/de/teamteamteam/spacescooter/GameFrame.java +++ b/src/de/teamteamteam/spacescooter/GameFrame.java @@ -159,8 +159,10 @@ public class GameFrame extends JFrame { * KEY_ANTIALIASING is very expensive and doesn't do much more over KEY_TEXT_ANTIALIASING */ private void applyRenderingHints(Graphics2D bufferedGraphics) { - if(GameConfig.antialiasing == true) { + if(GameConfig.key_antialiasing == true) { 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); } } diff --git a/src/de/teamteamteam/spacescooter/brain/GameConfig.java b/src/de/teamteamteam/spacescooter/brain/GameConfig.java index 420d175..bd9f528 100644 --- a/src/de/teamteamteam/spacescooter/brain/GameConfig.java +++ b/src/de/teamteamteam/spacescooter/brain/GameConfig.java @@ -26,9 +26,14 @@ public class GameConfig { 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; /**