diff options
author | Kenneth Russel <[email protected]> | 2007-05-17 05:34:26 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2007-05-17 05:34:26 +0000 |
commit | e01fc6a8d55576dc4b0f856a4d77da7eed51652b (patch) | |
tree | 6f7373ee46da7fa182f8bdfad0a38b5b7a4f88f0 /src/classes | |
parent | 47e02bb0e236c466a92a248f0f715bbf34667f37 (diff) |
Fixed problem in TextRenderer where custom render delegates would
result in corrupted backing store due to semantics of
Graphics.copyArea() paying attention to transparent pixels; need to
clear out the destination rectangle first
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1248 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes')
-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(), |