[libbluray-devel] BDGraphics: make deep copy of clipping rectangles

hpi1 git at videolan.org
Wed Mar 26 00:10:48 CET 2014


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue Mar 25 21:49:30 2014 +0200| [b34e91735d3e067a744c0153859795562db39d8c] | committer: hpi1

BDGraphics: make deep copy of clipping rectangles

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=b34e91735d3e067a744c0153859795562db39d8c
---

 src/libbluray/bdj/java-j2me/java/awt/BDGraphics.java |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/libbluray/bdj/java-j2me/java/awt/BDGraphics.java b/src/libbluray/bdj/java-j2me/java/awt/BDGraphics.java
index 6781ebf..2d241ff 100644
--- a/src/libbluray/bdj/java-j2me/java/awt/BDGraphics.java
+++ b/src/libbluray/bdj/java-j2me/java/awt/BDGraphics.java
@@ -82,8 +82,13 @@ class BDGraphics extends Graphics2D implements ConstrainableGraphics {
         originX = g.originX;
         originY = g.originY;
         actualClip = g.clip;
-        clip = g.clip;
-        constrainedRect = g.constrainedRect;
+        if (g.clip != null) {
+            clip = new Rectangle(g.clip);
+        }
+        if (g.constrainedRect != null) {
+            constrainedRect = new Rectangle(g.constrainedRect);
+        }
+        setupClip();
     }
 
     BDGraphics(BDRootWindow window) {



More information about the libbluray-devel mailing list