org.apache.fop.render
Class PrintRenderer

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

public abstract class PrintRenderer
extends java.lang.Object
implements Renderer

Abstract base class of "Print" type renderers.


Field Summary
protected  int currentAreaContainerXPosition
          the horizontal position of the current area container
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  int currentXPosition
          the current horizontal position in millipoints from left
protected  int currentYPosition
          the current vertical position in millipoints from bottom
protected  FontInfo fontInfo
           
protected  IDReferences idReferences
          the IDReferences for this document
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
           
protected  int prevUnderlineYEndPos
           
 
Constructor Summary
PrintRenderer()
           
 
Method Summary
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 rectangle to the current stream
protected  void addWordLines(WordArea area, int rx, int bl, int size, PDFColor theAreaColor)
           
abstract  void render(AreaTree areaTree, java.io.OutputStream stream)
          render the areas
 void renderAreaContainer(AreaContainer area)
          render area container
 void renderBlockArea(BlockArea area)
          render block area
 void renderBodyAreaContainer(BodyAreaContainer area)
          render the given area container
 void renderDisplaySpace(DisplaySpace space)
          render display space
abstract  void renderForeignObjectArea(ForeignObjectArea area)
          render a foreign object area
abstract  void renderImageArea(ImageArea area)
          render image area
 void renderInlineSpace(InlineSpace space)
          render inline space
 void renderLeaderArea(LeaderArea area)
          render leader area
 void renderLineArea(LineArea area)
          render line area
abstract  void renderPage(Page page)
          render page
 void renderSpanArea(SpanArea area)
          render the given span area
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

currentYPosition

protected int currentYPosition
the current vertical position in millipoints from bottom

currentXPosition

protected int currentXPosition
the current horizontal position in millipoints from left

currentAreaContainerXPosition

protected int currentAreaContainerXPosition
the horizontal position of the current area container

prevUnderlineXEndPos

protected int prevUnderlineXEndPos

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

idReferences

protected IDReferences idReferences
the IDReferences for this document
Constructor Detail

PrintRenderer

public PrintRenderer()
Method Detail

setProducer

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

render

public abstract void render(AreaTree areaTree,
                            java.io.OutputStream stream)
                     throws java.io.IOException,
                            FOPException
render the areas
Specified by:
render in interface Renderer
Parameters:
areaTree - the laid-out area tree
stream - the OutputStream to write to

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 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

renderAreaContainer

public void renderAreaContainer(AreaContainer area)
render area container
Specified by:
renderAreaContainer in interface Renderer
Parameters:
area - the area container to render

renderBodyAreaContainer

public void renderBodyAreaContainer(BodyAreaContainer area)
Description copied from interface: Renderer
render the given area container
Specified by:
renderBodyAreaContainer in interface Renderer

renderSpanArea

public void renderSpanArea(SpanArea area)
Description copied from interface: Renderer
render the given span area
Specified by:
renderSpanArea in interface Renderer

renderBlockArea

public void renderBlockArea(BlockArea area)
render block area
Specified by:
renderBlockArea in interface Renderer
Parameters:
area - the block area to render

renderDisplaySpace

public void renderDisplaySpace(DisplaySpace space)
render display space
Specified by:
renderDisplaySpace in interface Renderer
Parameters:
space - the display space to render

renderImageArea

public abstract void renderImageArea(ImageArea area)
render image area
Specified by:
renderImageArea in interface Renderer
Parameters:
area - the image area to render

renderForeignObjectArea

public abstract void renderForeignObjectArea(ForeignObjectArea area)
render a foreign object area
Specified by:
renderForeignObjectArea in interface Renderer

renderSVGArea

public abstract void renderSVGArea(SVGArea area)
render SVG area
Specified by:
renderSVGArea in interface Renderer
Parameters:
area - the SVG area to render

renderWordArea

public abstract void renderWordArea(WordArea area)
render inline area
Specified by:
renderWordArea in interface Renderer
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
Specified by:
renderInlineSpace in interface Renderer
Parameters:
space - space to render

renderLineArea

public void renderLineArea(LineArea area)
render line area
Specified by:
renderLineArea in interface Renderer
Parameters:
area - area to render

renderPage

public abstract void renderPage(Page page)
render page
Specified by:
renderPage in interface Renderer
Parameters:
page - page to render

renderLeaderArea

public void renderLeaderArea(LeaderArea area)
render leader area
Specified by:
renderLeaderArea in interface Renderer
Parameters:
area - area to render

setupFontInfo

public void setupFontInfo(FontInfo fontInfo)
set up the font info
Specified by:
setupFontInfo in interface Renderer
Parameters:
fontInfo - font info to set up


Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.