diff options
author | Starla Insigna <hatkirby@fourisland.com> | 2009-02-10 15:49:48 -0500 |
---|---|---|
committer | Starla Insigna <hatkirby@fourisland.com> | 2009-02-10 15:49:48 -0500 |
commit | 11651c651b6472ca4130484063c220a800cca587 (patch) | |
tree | ab0f03126944f92b958e7253806d811e67776db1 /src/com/fourisland/fourpuzzle/window/MessageWindow.java | |
parent | 877a590522e1d9a5e44ae19c41a8fd64a0faf538 (diff) | |
download | fourpuzzle-11651c651b6472ca4130484063c220a800cca587.tar.gz fourpuzzle-11651c651b6472ca4130484063c220a800cca587.tar.bz2 fourpuzzle-11651c651b6472ca4130484063c220a800cca587.zip |
Engine: Refactored SystemGraphic transparency
Previously, every time a transparent section of SystemGraphic had to be rendered, it would be to be fed through Toolkit, FilteredImageSource, TransparentImageFilter and converted from a BufferedImage to an Image to a BufferedImage again. This has been replaced (and optimized) by preforming this when the SystemGraphic is loaded into memory, instead of every time it is used. Refs #5
Diffstat (limited to 'src/com/fourisland/fourpuzzle/window/MessageWindow.java')
-rw-r--r-- | src/com/fourisland/fourpuzzle/window/MessageWindow.java | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/com/fourisland/fourpuzzle/window/MessageWindow.java b/src/com/fourisland/fourpuzzle/window/MessageWindow.java index 9e482ba..ea34ab9 100644 --- a/src/com/fourisland/fourpuzzle/window/MessageWindow.java +++ b/src/com/fourisland/fourpuzzle/window/MessageWindow.java | |||
@@ -38,11 +38,7 @@ public class MessageWindow { | |||
38 | 38 | ||
39 | initalizeMessages(message, new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB).createGraphics()); | 39 | initalizeMessages(message, new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB).createGraphics()); |
40 | 40 | ||
41 | cacheBase = new BufferedImage(Game.WIDTH, Window.Default.getFullHeight(HEIGHT), BufferedImage.TYPE_INT_ARGB); | 41 | cacheBase = Window.Default.getImage(width, HEIGHT); |
42 | Graphics2D g2 = cacheBase.createGraphics(); | ||
43 | |||
44 | g2.drawImage(SystemGraphic.getMessageBackground(), 1, 1, Game.WIDTH-2, Window.Default.getFullHeight(HEIGHT)-2, null); | ||
45 | g2.drawImage(Window.Default.getImage(width, HEIGHT), 0, 0, null); | ||
46 | } | 42 | } |
47 | 43 | ||
48 | private void initalizeMessages(String message, Graphics2D g) | 44 | private void initalizeMessages(String message, Graphics2D g) |