Revision: 3605
          http://vexi.svn.sourceforge.net/vexi/?rev=3605&view=rev
Author:   clrg
Date:     2009-08-17 08:53:35 +0000 (Mon, 17 Aug 2009)

Log Message:
-----------
Fix dirty algorithm expanding dirty areas

Modified Paths:
--------------
    trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp

Modified: trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp
===================================================================
--- trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp  2009-08-14 13:40:53 UTC 
(rev 3604)
+++ trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp  2009-08-17 08:53:35 UTC 
(rev 3605)
@@ -348,11 +348,6 @@
     private final void dirty(int x, int y, int w, int h) {
         for (Box cur = this; cur != null; cur = cur.parent) {
             if (!cur.test(DISPLAY)) return;
-            x = max(x, 0);
-            y = max(y, 0);
-            w = min(x + w, cur.width);
-            h = min(y + h, cur.height);
-            if (w <= 0 || h <= 0) return;
             // get around sub-sampling of enlarged textures
             if (cur.texture != null && !cur.test(TILE_IMAGE)) {
                 // REMARK: inefficient but otherwise the consistency of
@@ -363,7 +358,13 @@
                 // prerender enlarged image at time of render and then
                 // just paint the relevant part of the enlarged image
                 x = 0; y = 0; w = cur.width; h = cur.height;
+            } else {
+                x = max(x, 0);
+                y = max(y, 0);
+                w = min(w, cur.width - x);
+                h = min(h, cur.height - y);
             }
+            if (w <= 0 || h <= 0) return;
             // x and y have a different meaning on the root box
             if (cur.parent == null) {
                 Surface s = cur.getSurface();


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to