You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by gm...@apache.org on 2003/09/09 21:43:49 UTC
cvs commit: xml-fop/src/java/org/apache/fop/render/ps PSTextPainter.java
gmazza 2003/09/09 12:43:49
Modified: src/java/org/apache/fop/render/ps PSTextPainter.java
Log:
Changes to PSTextPainter to accomodate new Batik library.
Revision Changes Path
1.7 +11 -5 xml-fop/src/java/org/apache/fop/render/ps/PSTextPainter.java
Index: PSTextPainter.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/ps/PSTextPainter.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- PSTextPainter.java 20 Aug 2003 18:09:45 -0000 1.6
+++ PSTextPainter.java 9 Sep 2003 19:43:49 -0000 1.7
@@ -69,6 +69,7 @@
import org.apache.batik.gvt.TextPainter;
import org.apache.batik.gvt.TextNode;
import org.apache.batik.gvt.text.GVTAttributedCharacterIterator;
+import org.apache.batik.gvt.text.TextPaintInfo;
import org.apache.batik.gvt.font.GVTFontFamily;
import org.apache.batik.bridge.SVGFontFamily;
import org.apache.batik.gvt.renderer.StrokingTextPainter;
@@ -130,6 +131,14 @@
if (ch == AttributedCharacterIterator.DONE) {
return;
}
+
+ TextPaintInfo tpi = (TextPaintInfo) aci.getAttribute(
+ GVTAttributedCharacterIterator.TextAttribute.PAINT_INFO);
+
+ if (tpi == null) {
+ return;
+ }
+
TextNode.Anchor anchor;
anchor = (TextNode.Anchor) aci.getAttribute(
GVTAttributedCharacterIterator.TextAttribute.ANCHOR_TYPE);
@@ -138,15 +147,12 @@
gvtFonts = (List) aci.getAttribute(
GVTAttributedCharacterIterator.TextAttribute.GVT_FONT_FAMILIES);
Paint forg = (Paint) aci.getAttribute(TextAttribute.FOREGROUND);
- Paint strokePaint;
- strokePaint = (Paint) aci.getAttribute(
- GVTAttributedCharacterIterator.TextAttribute.STROKE_PAINT);
+ Paint strokePaint = tpi.strokePaint;
Float size = (Float) aci.getAttribute(TextAttribute.SIZE);
if (size == null) {
return;
}
- Stroke stroke = (Stroke) aci.getAttribute(
- GVTAttributedCharacterIterator.TextAttribute.STROKE);
+ Stroke stroke = tpi.strokeStroke;
/*
Float xpos = (Float) aci.getAttribute(
GVTAttributedCharacterIterator.TextAttribute.X);
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org