[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#288009: batik 1.5.1 would break fop



On Thu, Mar 10, 2005 at 10:28:08PM +0100, Wolfgang Baer wrote:
> Hi Michael,
> 
> Michael Koch wrote:
> >I would prefer to just add a patch to fop to make it work with batik
> >1.5.1 and just depend on batik >= 1.5.1. Putting a second batik copy
> >into fop should be avoided.
> 
> You are right - there is only one compile error - but I have absolutely
> no experience with awt programming.
> 
> The error is in the org.apache.fop.svg.PDFTextPainter class in the
> method "protected Point2D paintACI(AttributedCharacterIterator aci,
> Graphics2D g2d, Point2D loc)"
> 
> Stroke stroke = (Stroke)aci.getAttribute(GVTAttributedCharacterIterator.TextAttribute.STROKE);
> 
> GVTAttributedCharacterIterator.TextAttribute.STROKE is no more existent
> in batik 1.5.1 - I found the following hint on the batik-dev list
> (please have a look):
> 
> http://koala.ilog.fr/batik/mlists/batik-dev/archives/msg04290.html
> 
> I therefore replaced it as said with
> 
> TextPaintInfo pi = (TextPaintInfo)aci.getAttribute (GVTAttributedCharacterIterator.TextAttribute.PAINT_INFO);
> 
> The Stroke instance is used later in this method:
> 
> g2d.setStroke( stroke );
> 
> The TextPaintInfo class has several Stroke variables:
> 
> public java.awt.Stroke strokeStroke;
> public java.awt.Stroke underlineStroke;
> public java.awt.Stroke overlineStroke;
> public java.awt.Stroke strikethroughStroke;
> 
> Which one to use ?
> 
> g2d.setStroke( pi.strokeStroke ); ??
> 
> As said, I have no knowledge with awt - so if anyone can provide
> the "right" solution I would prepare a new fop upload with the
> patch. A batik 1.5.1 is already prepared.

Can you perhaps look into the old batik what value
GVTAttributedCharacterIterator.TextAttribute.STROKE has ?

What solution does fop CVS use ? (if they work with updated batik
already).


Michael
-- 
Java Trap: http://www.gnu.org/philosophy/java-trap.html



Reply to: