From 77e2780ea906def4d1f83e12e810ab68af2bbd54 Mon Sep 17 00:00:00 2001 From: megacz Date: Fri, 30 Jan 2004 07:38:21 +0000 Subject: [PATCH] 2003/09/27 07:08:01 darcs-hash:20040130073821-2ba56-5c421d3a378f9330dd2cd3881d30d1ce303524dd.gz --- src/org/xwt/Box.java.pp | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/src/org/xwt/Box.java.pp b/src/org/xwt/Box.java.pp index 71da82f..aac3bd1 100644 --- a/src/org/xwt/Box.java.pp +++ b/src/org/xwt/Box.java.pp @@ -134,7 +134,7 @@ public final class Box extends JS.Scope { // Rendering Properties /////////////////////////////////////////////////////////// - //private SVG.VP path = null; + private VectorGraphics.VectorPath path = null; //private SVG.Paint fill = null; //private SVG.Paint stroke = null; @@ -148,7 +148,10 @@ public final class Box extends JS.Scope { // Instance Methods ///////////////////////////////////////////////////////////////////// /** Adds the intersection of (x,y,w,h) and the node's current actual geometry to the Surface's dirty list */ - public final void dirty() { dirty(0, 0, width, height); } + public final void dirty() { + if ((flags & NOCLIP_FLAG) != 0 && parent != null) parent.dirty(); + else dirty(0, 0, width, height); + } public final void dirty(int x, int y, int w, int h) { for(Box cur = this; cur != null; cur = cur.parent) { if ((flags & NOCLIP_FLAG) == 0) { @@ -212,6 +215,10 @@ public final class Box extends JS.Scope { if (numChildren() == 0) { contentwidth = max(textwidth + 2 * hpad, minwidth); contentheight = max(textheight + 2 * vpad, minheight); + if (path != null) { + contentwidth = max(contentwidth, path.boundingBoxWidth()); + contentheight = max(contentheight, path.boundingBoxHeight()); + } return; } @@ -270,6 +277,10 @@ public final class Box extends JS.Scope { for(int col=0; col