diff options
Diffstat (limited to 'src/classes/com/sun/opengl/util')
-rwxr-xr-x | src/classes/com/sun/opengl/util/j2d/TextRenderer.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/classes/com/sun/opengl/util/j2d/TextRenderer.java b/src/classes/com/sun/opengl/util/j2d/TextRenderer.java index 2bbd2ee60..7d0a8ea2d 100755 --- a/src/classes/com/sun/opengl/util/j2d/TextRenderer.java +++ b/src/classes/com/sun/opengl/util/j2d/TextRenderer.java @@ -882,6 +882,14 @@ public class TextRenderer { TextureRenderer oldRenderer = (TextureRenderer) oldBackingStore; TextureRenderer newRenderer = (TextureRenderer) newBackingStore; + if (!renderDelegate.intensityOnly()) { + // Transparent pixels in the source image will not overwrite + // the contents of the backing store + g.setComposite(AlphaComposite.Clear); + g.fillRect(newLocation.x(), newLocation.y(), newLocation.w(), newLocation.h()); + g.setComposite(AlphaComposite.Src); + } + if (oldRenderer == newRenderer) { // Movement on the same backing store -- easy case g.copyArea(oldLocation.x(), oldLocation.y(), |