cvs commit: xml-fop/src/java/org/apache/fop/area AreaTree.java

2003-09-09 Thread vmote
vmote   2003/09/09 23:25:36

  Modified:src/java/org/apache/fop/apps Driver.java
   src/java/org/apache/fop/area AreaTree.java
  Log:
  remove unneeded reference to Renderer from within the area package
  
  Revision  ChangesPath
  1.39  +2 -1  xml-fop/src/java/org/apache/fop/apps/Driver.java
  
  Index: Driver.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/Driver.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- Driver.java   2 Sep 2003 13:56:40 -   1.38
  +++ Driver.java   10 Sep 2003 06:25:36 -  1.39
  @@ -52,6 +52,7 @@
   
   // FOP
   import org.apache.fop.area.AreaTree;
  +import org.apache.fop.area.RenderPagesModel;
   
   import org.apache.fop.fo.ElementMapping;
   import org.apache.fop.fo.FOTreeBuilder;
  @@ -588,7 +589,7 @@
   FOTreeHandler foTreeHandler = (FOTreeHandler)foInputHandler;
   foTreeHandler.addFOTreeListener(currentDocument);
   currentDocument.areaTree = new AreaTree();
  -currentDocument.atModel = AreaTree.createRenderPagesModel(renderer);
  +currentDocument.atModel = new RenderPagesModel(renderer);
   //this.atModel = new CachedRenderPagesModel(renderer);
   currentDocument.areaTree.setTreeModel(currentDocument.atModel);
   try {
  
  
  
  1.2   +10 -21xml-fop/src/java/org/apache/fop/area/AreaTree.java
  
  Index: AreaTree.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/AreaTree.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AreaTree.java 11 Mar 2003 13:05:27 -  1.1
  +++ AreaTree.java 10 Sep 2003 06:25:36 -  1.2
  @@ -3,34 +3,34 @@
* 
*The Apache Software License, Version 1.1
* 
  - * 
  + *
* Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
  - * 
  + *
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
  - * 
  + *
* 1. Redistributions of source code must retain the above copyright notice,
*this list of conditions and the following disclaimer.
  - * 
  + *
* 2. Redistributions in binary form must reproduce the above copyright notice,
*this list of conditions and the following disclaimer in the documentation
*and/or other materials provided with the distribution.
  - * 
  + *
* 3. The end-user documentation included with the redistribution, if any, must
*include the following acknowledgment: "This product includes software
*developed by the Apache Software Foundation (http://www.apache.org/)."
*Alternately, this acknowledgment may appear in the software itself, if
*and wherever such third-party acknowledgments normally appear.
  - * 
  + *
* 4. The names "FOP" and "Apache Software Foundation" must not be used to
*endorse or promote products derived from this software without prior
*written permission. For written permission, please contact
*[EMAIL PROTECTED]
  - * 
  + *
* 5. Products derived from this software may not be called "Apache", nor may
*"Apache" appear in their name, without prior written permission of the
*Apache Software Foundation.
  - * 
  + *
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  @@ -42,16 +42,14 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* 
  - * 
  + *
* This software consists of voluntary contributions made by many individuals
* on behalf of the Apache Software Foundation and was originally created by
* James Tauber <[EMAIL PROTECTED]>. For more information on the Apache
* Software Foundation, please see .
  - */ 
  + */
   package org.apache.fop.area;
   
  -import org.apache.fop.render.Renderer;
  -
   import java.util.ArrayList;
   import java.util.List;
   import java.util.Map;
  @@ -87,15 +85,6 @@
   // list of id's yet to be resolved and arraylists of pages
   private Map resolve = new HashMap();
   private List treeExtensions = new ArrayList();
  -
  -/**
  - * Create a render pages area tree model.
  - * @pa

cvs commit: xml-fop/src/java/org/apache/fop/render/ps PSTextPainter.java

2003-09-09 Thread gmazza
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  ChangesPath
  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.java20 Aug 2003 18:09:45 -  1.6
  +++ PSTextPainter.java9 Sep 2003 19:43:49 -   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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



FOP updated to new Batik API

2003-09-09 Thread Glen Mazza
--- Thomas DeWeese <[EMAIL PROTECTED]> wrote:
> > 1.) We do not have plans anytime soon for making a
> new
> > release of maintenance--so, if I made the change,
> the
> > new pdftranscoder.jar could be based only on a
> nightly
> > build--is that OK with you?
> 
>I think that would be fine.
> 

Changes have been made on maintenance (0.20.5) and
development (1.0) version.  I also updated the Batik
library to that of a nightly build.

I stand corrected--pdf transcoder.jar is actually
using our development (1.0) version--which is very
good news--you can checkout xml-fop and just run Ant
(default target) to get the pdftranscoder.jar.

We've had some moving around in the files recently--if
there's a problem with the pdftranscoder.jar, let us
know--we may need to update the build process in case
certain files have been left out.


> > How do I obtain a single batik.jar for me to
> compile
> > the changed application against?  What does an
> > official batik.jar include?
> 
>I don't know for certain but I suspect that this
> is all the classes from the source tree and files
> from
> the resource tree in batik (you could trim a little
> - get rid of interactive stuff but it would be
> small).
> 

According to an email from Keiron in the fop-dev
archives, FOP relies on the "all-jar" target in your
build.xml.  I just sent you a patch (in Bugzilla) to
update the build.xml helptext to include a description
of that target.  (Saves confusion down the road...)

Thanks,
Glen

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


cvs commit: xml-fop/src/java/org/apache/fop/svg PDFTextPainter.java

2003-09-09 Thread gmazza
gmazza  2003/09/09 12:44:22

  Modified:src/java/org/apache/fop/svg PDFTextPainter.java
  Log:
  Changes to PDFTextPainter to accomodate new Batik library.
  
  Revision  ChangesPath
  1.7   +13 -7 xml-fop/src/java/org/apache/fop/svg/PDFTextPainter.java
  
  Index: PDFTextPainter.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/svg/PDFTextPainter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- PDFTextPainter.java   20 Aug 2003 18:09:46 -  1.6
  +++ PDFTextPainter.java   9 Sep 2003 19:44:22 -   1.7
  @@ -68,6 +68,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;
  @@ -118,7 +119,7 @@
   // System.out.println("PDFText paint");
   String txt = node.getText();
   Point2D loc = node.getLocation();
  -
  +
   AttributedCharacterIterator aci =
 node.getAttributedCharacterIterator();
   // reset position to start of char iterator
  @@ -135,17 +136,22 @@
   
   List gvtFonts;
   gvtFonts = (List) aci.getAttribute(
  -  
GVTAttributedCharacterIterator.TextAttribute.GVT_FONT_FAMILIES);
  +GVTAttributedCharacterIterator.TextAttribute.GVT_FONT_FAMILIES);
  +
   Paint forg = (Paint) aci.getAttribute(TextAttribute.FOREGROUND);
  -Paint strokePaint;
  -strokePaint = (Paint) aci.getAttribute(
  - GVTAttributedCharacterIterator.TextAttribute.STROKE_PAINT);
  +TextPaintInfo tpi = (TextPaintInfo) aci.getAttribute(
  +GVTAttributedCharacterIterator.TextAttribute.PAINT_INFO);
  +
  +if (tpi == null) {
  +return;
  +}
  +
  +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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: xml-fop/lib batik.jar

2003-09-09 Thread gmazza
gmazza  2003/09/09 12:06:41

  Modified:lib  batik.jar
  Log:
  Nightly build version to accomodate new Batik API changes.
  
  Revision  ChangesPath
  1.10  +8536 -7713xml-fop/lib/batik.jar
  
<>
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: xml-fop/src/org/apache/fop/svg PDFTextPainter.java

2003-09-09 Thread gmazza
gmazza  2003/09/09 11:49:43

  Modified:src/org/apache/fop/svg Tag: fop-0_20_2-maintain
PDFTextPainter.java
  Log:
  Updates due to changes in Batik library.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.7.2.5   +11 -4 xml-fop/src/org/apache/fop/svg/Attic/PDFTextPainter.java
  
  Index: PDFTextPainter.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Attic/PDFTextPainter.java,v
  retrieving revision 1.7.2.4
  retrieving revision 1.7.2.5
  diff -u -r1.7.2.4 -r1.7.2.5
  --- PDFTextPainter.java   25 Feb 2003 15:08:11 -  1.7.2.4
  +++ PDFTextPainter.java   9 Sep 2003 18:49:42 -   1.7.2.5
  @@ -70,6 +70,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.text.Mark;
   import org.apache.batik.gvt.font.GVTFontFamily;
   import org.apache.batik.gvt.renderer.StrokingTextPainter;
  @@ -191,9 +192,15 @@
   if (size == null) {
   return loc;
   }
  -Stroke stroke =
  -
(Stroke)aci.getAttribute(GVTAttributedCharacterIterator.TextAttribute.STROKE);
   
  +TextPaintInfo tpi = (TextPaintInfo) aci.getAttribute(
  +GVTAttributedCharacterIterator.TextAttribute.PAINT_INFO);
  +
  +if (tpi == null) {
  +return loc;
  +}
  +
  +Stroke stroke = tpi.strokeStroke;
   Float posture = (Float)aci.getAttribute(TextAttribute.POSTURE);
   Float taWeight = (Float)aci.getAttribute(TextAttribute.WEIGHT);
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: xml-fop/lib batik.jar

2003-09-09 Thread gmazza
gmazza  2003/09/09 11:49:16

  Modified:lib  Tag: fop-0_20_2-maintain batik.jar
  Log:
  Nightly build as of 8 September 2003 (to accomodate latest Batik changes)
  Created via Batik "all-jar" Ant target.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.5.2.6   +8593 -7388xml-fop/lib/batik.jar
  
<>
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 23022] - [PATCH] RTF: added support for font-size and font-weight property

2003-09-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23022

[PATCH] RTF: added support for font-size and font-weight property

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-09-09 14:38 ---
Thanks, Peter. I have tested the patch and applied it. It looks great, and we 
appreciate the contribution.


cvs commit: xml-fop/src/java/org/apache/fop/rtf/renderer RTFHandler.java

2003-09-09 Thread vmote
vmote   2003/09/09 07:31:08

  Modified:src/java/org/apache/fop/rtf/renderer RTFHandler.java
  Log:
  add support for font-size and font-weight, as per patch from Peter Herweg 
(mailto:[EMAIL PROTECTED])
  
  Revision  ChangesPath
  1.17  +18 -0 xml-fop/src/java/org/apache/fop/rtf/renderer/RTFHandler.java
  
  Index: RTFHandler.java
  ===
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/rtf/renderer/RTFHandler.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- RTFHandler.java   1 Sep 2003 01:28:51 -   1.16
  +++ RTFHandler.java   9 Sep 2003 14:31:08 -   1.17
  @@ -186,6 +186,9 @@
   RtfAttributes rtfAttr = new RtfAttributes();
   attrBlockTextAlign(bl, rtfAttr);
   attrBlockBackgroundColor(bl, rtfAttr);
  +attrBlockFontSize(bl, rtfAttr);
  +attrBlockFontWeight(bl, rtfAttr);
  +
   para = sect.newParagraph(rtfAttr);
   } catch (IOException ioe) {
   // FIXME could we throw Exception in all FOInputHandler events?
  @@ -397,6 +400,21 @@
} catch (IOException ioe) {
   // FIXME could we throw Exception in all FOInputHandler events?
   throw new Error("IOException: " + ioe);
  +}
  +}
  +
  +private void attrBlockFontSize(Block bl, RtfAttributes rtfAttr){
  +int fopValue = bl.properties.get("font-size").getLength().getValue()/500;
  +rtfAttr.set("fs",fopValue);
  +}
  +
  +private void attrBlockFontWeight(Block bl, RtfAttributes rtfAttr){
  +String fopValue = bl.properties.get("font-weight").getString();
  +if(fopValue=="bold" || fopValue=="700"){
  +rtfAttr.set("b",1);
  +}
  +else{
  +rtfAttr.set("b",0);
   }
   }
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 23022] - [PATCH] RTF: added support for font-size and font-weight property

2003-09-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23022

[PATCH] RTF: added support for font-size and font-weight property





--- Additional Comments From [EMAIL PROTECTED]  2003-09-09 10:47 ---
Created an attachment (id=8114)
RTF: added support for font-size and font-weight property


DO NOT REPLY [Bug 23022] New: - [PATCH] RTF: added support for font-size and font-weight property

2003-09-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23022

[PATCH] RTF: added support for font-size and font-weight property

   Summary: [PATCH] RTF: added support for font-size and font-weight
property
   Product: Fop
   Version: all
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: general
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]


Hi,

i'd like to submit attached patch to the rtf renderer.
It adds support for font-size and font-weight property.

Bye
Peter


Re: Batik Extension/FOP problem

2003-09-09 Thread Thomas DeWeese
Glen Mazza wrote:
Thomas,

Two concerns on making this change in our production
version: 

1.) We do not have plans anytime soon for making a new
release of maintenance--so, if I made the change, the
new pdftranscoder.jar could be based only on a nightly
build--is that OK with you?
  I think that would be fine.

2.) I checked out xml-batik and ran "ant dist-zip"--it
created many jar files, but no single batik.jar file
that FOP currently relies on:
http://cvs.apache.org/viewcvs.cgi/xml-fop/lib/batik.jar

How do I obtain a single batik.jar for me to compile
the changed application against?  What does an
official batik.jar include?
  I don't know for certain but I suspect that this
is all the classes from the source tree and files from
the resource tree in batik (you could trim a little
- get rid of interactive stuff but it would be small).
  Currently we always distribute the 'many' jar files
we provide a convenience batik.jar that just references
all the other jar files.
  The simplest way to get the jar would be to clean the
compile tree.  Run 'build compile' then jar classes and
'resources'.