deweese 02/04/15 06:44:46
Modified: sources/org/apache/batik/ext/awt/image/renderable
PadRable8Bit.java
sources/org/apache/batik/gvt/filter BackgroundRable8Bit.java
sources/org/apache/batik/gvt/text
BidiAttributedCharacterIterator.java
Log:
1) Fixed a but in PadRable8Bit where it could change the bounds of
a referenced source filter.
2) Fixed a text selection bug (caused by not providing BIDI attributes
on all text).
Revision Changes Path
1.6 +2 -1
xml-batik/sources/org/apache/batik/ext/awt/image/renderable/PadRable8Bit.java
Index: PadRable8Bit.java
===================================================================
RCS file:
/home/cvs/xml-batik/sources/org/apache/batik/ext/awt/image/renderable/PadRable8Bit.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- PadRable8Bit.java 3 Aug 2001 17:37:28 -0000 1.5
+++ PadRable8Bit.java 15 Apr 2002 13:44:46 -0000 1.6
@@ -30,7 +30,7 @@
* This pads the image to a specified rectangle in user coord system.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Thomas DeWeese</a>
- * @version $Id: PadRable8Bit.java,v 1.5 2001/08/03 17:37:28 deweese Exp $
+ * @version $Id: PadRable8Bit.java,v 1.6 2002/04/15 13:44:46 deweese Exp $
*/
public class PadRable8Bit extends AbstractRable
implements PadRable, PaintRable {
@@ -157,6 +157,7 @@
RenderedImage ri = null;
if (arect.intersects(srect) == true) {
+ srect = (Rectangle2D)srect.clone();
Rectangle2D.intersect(srect, arect, srect);
RenderContext srcRC = new RenderContext(usr2dev, srect, rh);
1.12 +9 -11
xml-batik/sources/org/apache/batik/gvt/filter/BackgroundRable8Bit.java
Index: BackgroundRable8Bit.java
===================================================================
RCS file:
/home/cvs/xml-batik/sources/org/apache/batik/gvt/filter/BackgroundRable8Bit.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- BackgroundRable8Bit.java 10 Apr 2002 21:36:45 -0000 1.11
+++ BackgroundRable8Bit.java 15 Apr 2002 13:44:46 -0000 1.12
@@ -44,7 +44,7 @@
* createRendering methods.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Vincent Hardy</a>
- * @version $Id: BackgroundRable8Bit.java,v 1.11 2002/04/10 21:36:45 deweese Exp $
+ * @version $Id: BackgroundRable8Bit.java,v 1.12 2002/04/15 13:44:46 deweese Exp $
*/
public class BackgroundRable8Bit
extends AbstractRable {
@@ -107,7 +107,7 @@
cr2d = at.createTransformedShape(cr2d).getBounds2D();
if (r2d == null) r2d = (Rectangle2D)cr2d.clone();
- r2d.add(cr2d);
+ else r2d.add(cr2d);
}
if (r2d == null) {
@@ -147,7 +147,7 @@
if (r2d == CompositeGraphicsNode.VIEWPORT) {
// If we don't have a child then just use our bounds.
if (child == null)
- return gn.getPrimitiveBounds();
+ return (Rectangle2D)gn.getPrimitiveBounds().clone();
// gn must be composite so add all it's children's bounds
// up to child.
@@ -308,10 +308,8 @@
if (aoi.intersects(cbounds)) {
- GraphicsNodeRable gnr;
- gnr = new GraphicsNodeRable8Bit(childGN);
- gnr.setUsePrimitivePaint(false);
- srcs.add(gnr);
+ srcs.add(childGN.getEnableBackgroundGraphicsNodeRable
+ (true));
}
}
}
@@ -379,17 +377,17 @@
Shape aoi = renderContext.getAreaOfInterest();
if (aoi != null) {
Rectangle2D aoiR2d = aoi.getBounds2D();
- if (r2d.intersects(aoiR2d) == false)
- return null;
-
// System.out.println("R2d: " + r2d);
// System.out.println("AOI: " + aoiR2d);
+ if (r2d.intersects(aoiR2d) == false)
+ return null;
+
Rectangle2D.intersect(r2d, aoiR2d, r2d);
}
Filter background = getBackground(node, null, r2d);
-
+ // System.out.println("BG: " + background);
if ( background == null)
return null;
1.6 +4 -5
xml-batik/sources/org/apache/batik/gvt/text/BidiAttributedCharacterIterator.java
Index: BidiAttributedCharacterIterator.java
===================================================================
RCS file:
/home/cvs/xml-batik/sources/org/apache/batik/gvt/text/BidiAttributedCharacterIterator.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- BidiAttributedCharacterIterator.java 29 Jan 2002 16:19:01 -0000 1.5
+++ BidiAttributedCharacterIterator.java 15 Apr 2002 13:44:46 -0000 1.6
@@ -26,7 +26,7 @@
* in a text run will all have the same bidi level.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Bella Robinson</a>
- * @version $Id: BidiAttributedCharacterIterator.java,v 1.5 2002/01/29 16:19:01
deweese Exp $
+ * @version $Id: BidiAttributedCharacterIterator.java,v 1.6 2002/04/15 13:44:46
deweese Exp $
*/
public class BidiAttributedCharacterIterator implements AttributedCharacterIterator
{
@@ -126,6 +126,9 @@
if (newBiDi > maxBiDi) maxBiDi = newBiDi;
}
}
+ as.addAttribute
+ (GVTAttributedCharacterIterator.TextAttribute.BIDI_LEVEL,
+ new Integer(currBiDi), runStart, numChars);
if ((runStart == 0) && (currBiDi==0)) {
// This avoids all the mucking about we need to do when
@@ -137,10 +140,6 @@
newCharOrder[i] = chunkStart+i;
return;
}
-
- as.addAttribute
- (GVTAttributedCharacterIterator.TextAttribute.BIDI_LEVEL,
- new Integer(currBiDi), runStart, numChars);
this.aci = as.getIterator();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]