org.apache.fop.render.mif
Class MIFRenderer

java.lang.Object
  extended byorg.apache.fop.render.AbstractRenderer
      extended byorg.apache.fop.render.mif.MIFRenderer
All Implemented Interfaces:
Renderer

public class MIFRenderer
extends AbstractRenderer

Renders areas to MIF. Collects all the Pages and print them out at the end. This means that the MIF renderer does not stream.

Author:
Seshadri G, Mark Lillywhite

Field Summary
protected  int currentXPosition
          the current horizontal position in millipoints from left
protected  int currentYPosition
          the current vertical position in millipoints from bottom
protected  MIFDocument mifDoc
          the MIF Document being created
protected  Map options
          options
 
Fields inherited from class org.apache.fop.render.AbstractRenderer
idReferences, log
 
Constructor Summary
MIFRenderer()
          create the MIF renderer
 
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 doFrame(Area area)
           
protected  void drawImageClipped(int x, int y, int clipX, int clipY, int clipW, int clipH, FopImage image, FontState fs)
          Renders an image, clipping it as specified.
protected  void drawImageScaled(int x, int y, int w, int h, FopImage image, FontState fs)
          Renders an image, scaling it to the given width and height.
 void render(Page page, OutputStream outputStream)
          render the given area tree to the given stream
 void renderAreaContainer(AreaContainer area)
          render area container
 void renderBlockArea(BlockArea area)
          render the given block area
 void renderDisplaySpace(DisplaySpace space)
          render the given display space
 void renderForeignObjectArea(ForeignObjectArea area)
          render a foreign object area
 void renderImageArea(ImageArea area)
          render the given image area
 void renderInlineArea(InlineArea area)
          render the given inline area
 void renderInlineSpace(InlineSpace space)
          render the given inline space
 void renderLeaderArea(LeaderArea area)
          render the given leader area
 void renderLineArea(LineArea area)
          render the given line area
 void renderPage(Page page)
          render the given page
 void renderSpanArea(SpanArea area)
          render the given span area
 void renderSVGArea(SVGArea area)
          render the given SVG area
 void renderWordArea(WordArea area)
          render the given inline area
 void setOptions(Map options)
          set up renderer options
 void setProducer(String producer)
          set the producer of the rendering
 void setupFontInfo(FontInfo fontInfo)
          set up the given FontInfo
 void startRenderer(OutputStream outputStream)
          Default start renderer method.
 void stopRenderer(OutputStream outputStream)
          Default stop renderer method.
 
Methods inherited from class org.apache.fop.render.AbstractRenderer
doBackground, drawImage, getIDReferences, renderBodyAreaContainer, renderRegionAreaContainer, renderRegions, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentYPosition

protected int currentYPosition
the current vertical position in millipoints from bottom


currentXPosition

protected int currentXPosition
the current horizontal position in millipoints from left


mifDoc

protected MIFDocument mifDoc
the MIF Document being created


options

protected Map options
options

Constructor Detail

MIFRenderer

public MIFRenderer()
create the MIF renderer

Method Detail

setOptions

public void setOptions(Map options)
set up renderer options


setupFontInfo

public void setupFontInfo(FontInfo fontInfo)
set up the given FontInfo


setProducer

public void setProducer(String producer)
set the producer of the rendering


renderAreaContainer

public void renderAreaContainer(AreaContainer area)
Description copied from class: AbstractRenderer
render area container

Specified by:
renderAreaContainer in interface Renderer
Overrides:
renderAreaContainer in class AbstractRenderer
Parameters:
area - the area container to render

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.

Specified by:
addFilledRect in class 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

doFrame

protected void doFrame(Area area)
Specified by:
doFrame in class AbstractRenderer

renderSpanArea

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

Specified by:
renderSpanArea in interface Renderer
Overrides:
renderSpanArea in class AbstractRenderer

renderBlockArea

public void renderBlockArea(BlockArea area)
render the given block area

Specified by:
renderBlockArea in interface Renderer
Overrides:
renderBlockArea in class AbstractRenderer
Parameters:
area - the block area to render

renderDisplaySpace

public void renderDisplaySpace(DisplaySpace space)
render the given display space


renderSVGArea

public void renderSVGArea(SVGArea area)
render the given SVG area


renderForeignObjectArea

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


renderWordArea

public void renderWordArea(WordArea area)
Description copied from interface: Renderer
render the given inline area


drawImageScaled

protected void drawImageScaled(int x,
                               int y,
                               int w,
                               int h,
                               FopImage image,
                               FontState fs)
Renders an image, scaling it to the given width and height. If the scaled width and height is the same intrinsic size of the image, the image is not scaled.

Specified by:
drawImageScaled in class 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
image - the image to be rendered
fs - the font state to use when rendering text in non-bitmapped images.

drawImageClipped

protected void drawImageClipped(int x,
                                int y,
                                int clipX,
                                int clipY,
                                int clipW,
                                int clipH,
                                FopImage image,
                                FontState fs)
Renders an image, clipping it as specified.

Specified by:
drawImageClipped in class AbstractRenderer
Parameters:
x - the x position of left edge in millipoints.
y - the y position of top edge in millipoints.
clipX - the left edge of the clip in millipoints
clipY - the top edge of the clip in millipoints
clipW - the clip width in millipoints
clipH - the clip height in millipoints
fs - the font state to use when rendering text in non-bitmapped images.

renderImageArea

public void renderImageArea(ImageArea area)
render the given image area

Specified by:
renderImageArea in interface Renderer
Overrides:
renderImageArea in class AbstractRenderer
Parameters:
area - the image area to render

renderInlineArea

public void renderInlineArea(InlineArea area)
render the given inline area


renderInlineSpace

public void renderInlineSpace(InlineSpace space)
render the given inline space


renderLineArea

public void renderLineArea(LineArea area)
render the given line area

Specified by:
renderLineArea in interface Renderer
Overrides:
renderLineArea in class AbstractRenderer
Parameters:
area - area to render

renderPage

public void renderPage(Page page)
render the given page


renderLeaderArea

public void renderLeaderArea(LeaderArea area)
render the given leader area


startRenderer

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

Throws:
IOException

stopRenderer

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

Throws:
IOException

render

public void render(Page page,
                   OutputStream outputStream)
Description copied from interface: Renderer
render the given area tree to the given stream



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