aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache
diff options
context:
space:
mode:
authorarved <arved@unknown>2001-03-13 02:36:39 +0000
committerarved <arved@unknown>2001-03-13 02:36:39 +0000
commit7488aac9e6e1ac3e58f62029c97c7595c3147596 (patch)
tree34a5457bd75a742d3ef5ace74dfba3e201483bc2 /src/org/apache
parentf559f2f8664c1f4e983b2f833c4d3c95e1012fbc (diff)
downloadxmlgraphics-fop-7488aac9e6e1ac3e58f62029c97c7595c3147596.tar.gz
xmlgraphics-fop-7488aac9e6e1ac3e58f62029c97c7595c3147596.zip
Mods to text renderer
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194153 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache')
-rwxr-xr-xsrc/org/apache/fop/render/txt/TXTRenderer.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/org/apache/fop/render/txt/TXTRenderer.java b/src/org/apache/fop/render/txt/TXTRenderer.java
index e8ba1c040..496d16d2e 100755
--- a/src/org/apache/fop/render/txt/TXTRenderer.java
+++ b/src/org/apache/fop/render/txt/TXTRenderer.java
@@ -90,9 +90,10 @@ public class TXTRenderer extends PrintRenderer
if ( first )
first = false;
else
- currentStream.add("/f");
+ currentStream.add("\f");
this.renderPage((Page) e.nextElement());
}
+ currentStream.add("\n");
if ( !idReferences.isEveryIdValid() )
{
//throw new FOPException("The following id's were referenced but not found: "+idReferences.getInvalidIds()+"\n");
@@ -810,17 +811,20 @@ System.out.println("TXTRenderer.addRect(" + x + ", " + y + ", " + w + ", " + h +
boolean printBMP(FopImage img, int x, int y, int w, int h) throws FopImageException
{
+ if ( debug )
+ System.out.println("TXTRenderer.printBMP(" + img + ", " + x + ", "
+ + y + ", " + w + ", " + h + ")");
addRect(x, y, w, h, new PDFColor(1f, 1f, 1f), new PDFColor(0f, 0f, 0f));
int nameh = (int)(h * yFactor / 2);
if ( nameh > 0 )
{
int namew = (int)(w * xFactor);
- if ( namew > 10 )
+ if ( namew > 4 )
{
String iname = img.getURL();
if ( iname.length() >= namew )
- addStr((int)((pageHeight - (y / 100))* 100 * yFactor) + nameh, (int)(x * xFactor), iname.substring(namew - iname.length(), namew), true);
+ addStr((int)((pageHeight - (y / 100))* 100 * yFactor) + nameh, (int)(x * xFactor), iname.substring(iname.length() - namew), true);
else
addStr((int)((pageHeight - (y / 100))* 100 * yFactor) + nameh, (int)(x * xFactor + (namew - iname.length()) / 2), iname, true);
@@ -1723,7 +1727,8 @@ System.out.println("TXTRenderer.renderPage() maxX=" + maxX + " maxY=" + maxY + "
if ( outr != null )
currentStream.add(outr.toString());
- currentStream.add("\n");
+ if ( row < maxY )
+ currentStream.add("\n");
}
// End page.