org.apache.fop.render
Class PrintRenderer

java.lang.Object
  |
  +--org.apache.fop.render.AbstractRenderer
        |
        +--org.apache.fop.render.PrintRenderer
All Implemented Interfaces:
Renderer
Direct Known Subclasses:
PCLRenderer, PDFRenderer, TXTRenderer

public abstract class PrintRenderer
extends AbstractRenderer

Abstract base class of "Print" type renderers. Modified by Mark Lillywhite mark-fop@inomial.com. Removed the render(AreaTree, OutputStream) method, and added no-op concrete implementation of startRenderer() and stopRenderer(). The method render(Page, OutputStream) is not mentioned in this class but it is inherited from the Renderer interface.


Field Summary
protected  PDFPathPaint currentFill
          the current color/gradient to fill shapes with
protected  java.lang.String currentFontName
          the current (internal) font name
protected  int currentFontSize
          the current font size in millipoints
protected  PDFPathPaint currentStroke
          the current color/gradient for borders, letters, etc.
protected  FontInfo fontInfo
           
protected  PDFColor prevLineThroughColor
           
protected  int prevLineThroughSize
           
protected  int prevLineThroughXEndPos
           
protected  int prevLineThroughYEndPos
           
protected  PDFColor prevOverlineColor
           
protected  int prevOverlineSize
           
protected  int prevOverlineXEndPos
           
protected  int prevOverlineYEndPos
           
protected  PDFColor prevUnderlineColor
           
protected  int prevUnderlineSize
           
protected  int prevUnderlineXEndPos
          the current colour's blue component
protected  int prevUnderlineYEndPos
           
 
Fields inherited from class org.apache.fop.render.AbstractRenderer
currentAreaContainerXPosition, currentXPosition, currentYPosition, idReferences, log
 
Constructor Summary
PrintRenderer()
           
 
Method Summary
protected  void addFilledRect(int x, int y, int w, int h, ColorType col)
          Add a filled rectangle to the current stream This default implementation calls addRect using the same color for fill and border.
protected  void addFilledRect(int x, int y, int w, int h, PDFPathPaint fill)
          Add a filled rectangle to the current stream This default implementation calls addRect using the same color for fill and border.
protected abstract  void addLine(int x1, int y1, int x2, int y2, int th, int rs, PDFPathPaint stroke)
          add a line to the current stream
protected abstract  void addLine(int x1, int y1, int x2, int y2, int th, PDFPathPaint stroke)
          add a line to the current stream
protected abstract  void addRect(int x, int y, int w, int h, PDFPathPaint stroke)
          add a rectangle to the current stream
protected abstract  void addRect(int x, int y, int w, int h, PDFPathPaint stroke, PDFPathPaint fill)
          add a filled and stroked rectangle to the current stream
protected  void addWordLines(WordArea area, int rx, int bl, int size, PDFColor theAreaColor)
           
protected  void doFrame(Area area)
           
 void renderDisplaySpace(DisplaySpace space)
          render display space
abstract  void renderForeignObjectArea(ForeignObjectArea area)
          render a foreign object area
 void renderInlineSpace(InlineSpace space)
          render inline space
 void renderLeaderArea(LeaderArea area)
          render leader area
abstract  void renderPage(Page page)
          render page
abstract  void renderSVGArea(SVGArea area)
          render SVG area
abstract  void renderWordArea(WordArea area)
          render inline area
abstract  void setProducer(java.lang.String producer)
          set the document's producer
 void setupFontInfo(FontInfo fontInfo)
          set up the font info
 void startRenderer(java.io.OutputStream outputStream)
          Default start renderer method.
 void stopRenderer(java.io.OutputStream outputStream)
          Default stop renderer method.
 
Methods inherited from class org.apache.fop.render.AbstractRenderer
doBackground, drawImage, drawImageClipped, drawImageScaled, getIDReferences, renderAreaContainer, renderBlockArea, renderBodyAreaContainer, renderImageArea, renderLineArea, renderRegionAreaContainer, renderRegions, renderSpanArea, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.fop.render.Renderer
render, setOptions
 

Field Detail

currentFontName

protected java.lang.String currentFontName
the current (internal) font name

currentFontSize

protected int currentFontSize
the current font size in millipoints

currentStroke

protected PDFPathPaint currentStroke
the current color/gradient for borders, letters, etc.

currentFill

protected PDFPathPaint currentFill
the current color/gradient to fill shapes with

prevUnderlineXEndPos

protected int prevUnderlineXEndPos
the current colour's blue component

prevUnderlineYEndPos

protected int prevUnderlineYEndPos

prevUnderlineSize

protected int prevUnderlineSize

prevUnderlineColor

protected PDFColor prevUnderlineColor

prevOverlineXEndPos

protected int prevOverlineXEndPos

prevOverlineYEndPos

protected int prevOverlineYEndPos

prevOverlineSize

protected int prevOverlineSize

prevOverlineColor

protected PDFColor prevOverlineColor

prevLineThroughXEndPos

protected int prevLineThroughXEndPos

prevLineThroughYEndPos

protected int prevLineThroughYEndPos

prevLineThroughSize

protected int prevLineThroughSize

prevLineThroughColor

protected PDFColor prevLineThroughColor

fontInfo

protected FontInfo fontInfo
Constructor Detail

PrintRenderer

public PrintRenderer()
Method Detail

setProducer

public abstract void setProducer(java.lang.String producer)
set the document's producer
Parameters:
producer - string indicating application producing PDF

addLine

protected abstract void addLine(int x1,
                                int y1,
                                int x2,
                                int y2,
                                int th,
                                PDFPathPaint stroke)
add a line to the current stream
Parameters:
x1 - the start x location in millipoints
y1 - the start y location in millipoints
x2 - the end x location in millipoints
y2 - the end y location in millipoints
th - the thickness in millipoints
r - the red component
g - the green component
b - the blue component

addLine

protected abstract void addLine(int x1,
                                int y1,
                                int x2,
                                int y2,
                                int th,
                                int rs,
                                PDFPathPaint stroke)
add a line to the current stream
Parameters:
x1 - the start x location in millipoints
y1 - the start y location in millipoints
x2 - the end x location in millipoints
y2 - the end y location in millipoints
th - the thickness in millipoints
rs - the rule style
r - the red component
g - the green component
b - the blue component

addRect

protected abstract void addRect(int x,
                                int y,
                                int w,
                                int h,
                                PDFPathPaint stroke)
add a rectangle to the current stream
Parameters:
x - the x position of left edge in millipoints
y - the y position of top edge in millipoints
w - the width in millipoints
h - the height in millipoints
stroke - the stroke color/gradient

addRect

protected abstract void addRect(int x,
                                int y,
                                int w,
                                int h,
                                PDFPathPaint stroke,
                                PDFPathPaint fill)
add a filled and stroked rectangle to the current stream
Parameters:
x - the x position of left edge in millipoints
y - the y position of top edge in millipoints
w - the width in millipoints
h - the height in millipoints
fill - the fill color/gradient
stroke - the stroke color/gradient

addFilledRect

protected void addFilledRect(int x,
                             int y,
                             int w,
                             int h,
                             PDFPathPaint fill)
Add a filled rectangle to the current stream This default implementation calls addRect using the same color for fill and border.
Parameters:
x - the x position of left edge in millipoints
y - the y position of top edge in millipoints
w - the width in millipoints
h - the height in millipoints
fill - the fill color/gradient

addFilledRect

protected void addFilledRect(int x,
                             int y,
                             int w,
                             int h,
                             ColorType col)
Description copied from class: AbstractRenderer
Add a filled rectangle to the current stream This default implementation calls addRect using the same color for fill and border.
Overrides:
addFilledRect in class AbstractRenderer
Following copied from class: org.apache.fop.render.AbstractRenderer
Parameters:
x - the x position of left edge in millipoints
y - the y position of top edge in millipoints
w - the width in millipoints
h - the height in millipoints
fill - the fill color/gradient

doFrame

protected void doFrame(Area area)
Overrides:
doFrame in class AbstractRenderer

renderDisplaySpace

public void renderDisplaySpace(DisplaySpace space)
render display space
Parameters:
space - the display space to render

renderForeignObjectArea

public abstract void renderForeignObjectArea(ForeignObjectArea area)
render a foreign object area

renderSVGArea

public abstract void renderSVGArea(SVGArea area)
render SVG area
Parameters:
area - the SVG area to render

renderWordArea

public abstract void renderWordArea(WordArea area)
render inline area
Parameters:
area - inline area to render

addWordLines

protected void addWordLines(WordArea area,
                            int rx,
                            int bl,
                            int size,
                            PDFColor theAreaColor)

renderInlineSpace

public void renderInlineSpace(InlineSpace space)
render inline space
Parameters:
space - space to render

renderPage

public abstract void renderPage(Page page)
render page
Parameters:
page - page to render

renderLeaderArea

public void renderLeaderArea(LeaderArea area)
render leader area
Parameters:
area - area to render

setupFontInfo

public void setupFontInfo(FontInfo fontInfo)
                   throws FOPException
set up the font info
Parameters:
fontInfo - font info to set up

startRenderer

public void startRenderer(java.io.OutputStream outputStream)
                   throws java.io.IOException
Default start renderer method. This would normally be overridden. (mark-fop@inomial.com).

stopRenderer

public void stopRenderer(java.io.OutputStream outputStream)
                  throws java.io.IOException
Default stop renderer method. This would normally be overridden. (mark-fop@inomial.com).


Copyright ? 1999-2003 Apache Software Foundation. All Rights Reserved.