|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.fop.render.xml.XMLRenderer
Renderer that renders areas to XML for debugging purposes. Modified by Mark Lillywhite mark-fop@inomial.com to use the new renderer interface. Not 100% certain that this is correct.
Field Summary | |
protected IDReferences |
idReferences
|
protected int |
indent
indentation to use for pretty-printing the XML |
protected org.apache.avalon.framework.logger.Logger |
log
|
protected java.util.Map |
options
options |
protected java.lang.String |
producer
the application producing the XML |
protected java.io.PrintWriter |
writer
the writer used to output the XML |
Constructor Summary | |
XMLRenderer()
|
Method Summary | |
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. |
IDReferences |
getIDReferences()
|
void |
render(Page page,
java.io.OutputStream outputStream)
render the given area tree to the given stream |
void |
renderAreaContainer(AreaContainer area)
render an area container to XML |
void |
renderBlockArea(BlockArea area)
render a block area to XML |
void |
renderBodyAreaContainer(BodyAreaContainer area)
render a body area container to XML |
void |
renderDisplaySpace(DisplaySpace space)
render a display space to XML |
void |
renderForeignObjectArea(ForeignObjectArea area)
render a foreign object area |
void |
renderImageArea(ImageArea area)
render an image area to XML |
void |
renderInlineArea(InlineArea area)
|
void |
renderInlineSpace(InlineSpace space)
render an inline space to XML |
void |
renderLeaderArea(LeaderArea area)
render a leader area to XML |
void |
renderLineArea(LineArea area)
render a line area to XML |
void |
renderPage(Page page)
render a page to XML |
void |
renderRegionAreaContainer(AreaContainer area)
render a region area container to XML |
void |
renderSpanArea(SpanArea area)
render a span area to XML |
void |
renderSVGArea(SVGArea area)
render an SVG area to XML |
void |
renderWordArea(WordArea area)
render an inline area to XML |
void |
setLogger(org.apache.avalon.framework.logger.Logger logger)
Set the logger |
void |
setOptions(java.util.Map options)
set up renderer options |
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. |
protected void |
writeElement(java.lang.String element)
write out an element |
protected void |
writeEmptyElementTag(java.lang.String tag)
write out an empty-element-tag |
protected void |
writeEndTag(java.lang.String tag)
write out an end tag |
protected void |
writeIndent()
write out spaces to make indent |
protected void |
writeStartTag(java.lang.String tag)
write out a start tag |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected org.apache.avalon.framework.logger.Logger log
protected int indent
protected java.lang.String producer
protected java.io.PrintWriter writer
protected java.util.Map options
protected IDReferences idReferences
Constructor Detail |
public XMLRenderer()
Method Detail |
public void setLogger(org.apache.avalon.framework.logger.Logger logger)
Renderer
setLogger
in interface Renderer
public void setOptions(java.util.Map options)
setOptions
in interface Renderer
public void setProducer(java.lang.String producer)
setProducer
in interface Renderer
producer
- string indicating application producing the XMLpublic void render(Page page, java.io.OutputStream outputStream) throws java.io.IOException
Renderer
render
in interface Renderer
protected void writeIndent()
protected void writeElement(java.lang.String element)
element
- the full text of the element including tagsprotected void writeEmptyElementTag(java.lang.String tag)
tag
- the text of the tagprotected void writeEndTag(java.lang.String tag)
tag
- the text of the tagprotected void writeStartTag(java.lang.String tag)
tag
- the text of the tagpublic void setupFontInfo(FontInfo fontInfo) throws FOPException
setupFontInfo
in interface Renderer
fontInfo
- the font info object to set upprotected void drawImageScaled(int x, int y, int w, int h, FopImage image, FontState fs)
x
- the x position of left edge in millipointsy
- the y position of top edge in millipointsw
- the width in millipointsh
- the height in millipointsimage
- the image to be renderedfs
- the font state to use when rendering text
in non-bitmapped images.protected void drawImageClipped(int x, int y, int clipX, int clipY, int clipW, int clipH, FopImage image, FontState fs)
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 millipointsclipY
- the top edge of the clip in millipointsclipW
- the clip width in millipointsclipH
- the clip height in millipointsfill
- the image to be renderedfs
- the font state to use when rendering text
in non-bitmapped images.public void renderAreaContainer(AreaContainer area)
renderAreaContainer
in interface Renderer
area
- the area container to renderpublic void renderBodyAreaContainer(BodyAreaContainer area)
renderBodyAreaContainer
in interface Renderer
area
- the body area container to renderpublic void renderRegionAreaContainer(AreaContainer area)
renderRegionAreaContainer
in interface Renderer
area
- the region area container to renderpublic void renderSpanArea(SpanArea area)
renderSpanArea
in interface Renderer
area
- the span area to renderpublic void renderBlockArea(BlockArea area)
renderBlockArea
in interface Renderer
area
- the block area to renderpublic void renderInlineArea(InlineArea area)
public void renderDisplaySpace(DisplaySpace space)
renderDisplaySpace
in interface Renderer
space
- the space to renderpublic void renderForeignObjectArea(ForeignObjectArea area)
renderForeignObjectArea
in interface Renderer
public void renderSVGArea(SVGArea area)
renderSVGArea
in interface Renderer
area
- the area to renderpublic void renderImageArea(ImageArea area)
renderImageArea
in interface Renderer
area
- the area to renderpublic void renderWordArea(WordArea area)
renderWordArea
in interface Renderer
area
- the area to renderpublic void renderInlineSpace(InlineSpace space)
renderInlineSpace
in interface Renderer
space
- the space to renderpublic void renderLineArea(LineArea area)
renderLineArea
in interface Renderer
area
- the area to renderpublic void renderPage(Page page)
renderPage
in interface Renderer
page
- the page to renderpublic void renderLeaderArea(LeaderArea area)
renderLeaderArea
in interface Renderer
area
- the area to renderpublic void startRenderer(java.io.OutputStream outputStream) throws java.io.IOException
startRenderer
in interface Renderer
public void stopRenderer(java.io.OutputStream outputStream) throws java.io.IOException
stopRenderer
in interface Renderer
public IDReferences getIDReferences()
getIDReferences
in interface Renderer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |