|
fop 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.fop.render.AbstractRenderer
org.apache.fop.render.PrintRenderer
org.apache.fop.render.AbstractPathOrientedRenderer
org.apache.fop.render.intermediate.IFRenderer
public class IFRenderer
This renderer implementation is an adapter to the IFPainter interface. It is used
to generate content using FOP's intermediate format.
| Field Summary | |
|---|---|
static java.lang.String |
IF_MIME_TYPE
XML MIME type |
protected static org.apache.commons.logging.Log |
log
logging instance |
protected Renderer |
mimic
If not null, the XMLRenderer will mimic another renderer by using its font setup. |
protected java.util.Map |
pageIndices
Maps unique PageViewport key to page indices (for link target handling) |
| Fields inherited from class org.apache.fop.render.AbstractPathOrientedRenderer |
|---|
FOX_TRANSFORM |
| Fields inherited from class org.apache.fop.render.PrintRenderer |
|---|
embedFontInfoList, fontInfo, fontResolver |
| Fields inherited from class org.apache.fop.render.AbstractRenderer |
|---|
containingBPPosition, containingIPPosition, currentBPPosition, currentIPPosition, currentPageViewport, userAgent |
| Fields inherited from interface org.apache.fop.render.Renderer |
|---|
ROLE |
| Constructor Summary | |
|---|---|
IFRenderer(FOUserAgent userAgent)
Main constructor |
|
| Method Summary | |
|---|---|
protected void |
beginTextObject()
Indicates the beginning of a text object. |
protected java.util.List |
breakOutOfStateStack()
Breaks out of the state stack to handle fixed block-containers. |
protected void |
clip()
Clip using the current path. |
protected void |
clipRect(float x,
float y,
float width,
float height)
Clip using a rectangular area. |
protected void |
closePath()
Closes the current subpath by appending a straight line segment from the current point to the starting point of the subpath. |
protected void |
concatenateTransformationMatrix(java.awt.geom.AffineTransform at)
Concatenates the current transformation matrix with the given one, therefore establishing a new coordinate system. |
protected IFDocumentHandler |
createDefaultDocumentHandler()
Creates a default IFDocumentHandler when none has been set. |
protected void |
drawBorderLine(float x1,
float y1,
float x2,
float y2,
boolean horz,
boolean startOrBefore,
int style,
java.awt.Color col)
Draw a border segment of an XSL-FO style border. |
protected void |
drawBorders(float startx,
float starty,
float width,
float height,
BorderProps bpsBefore,
BorderProps bpsAfter,
BorderProps bpsStart,
BorderProps bpsEnd,
int level)
Draw the borders. |
protected void |
drawImage(java.lang.String uri,
java.awt.geom.Rectangle2D pos,
java.util.Map foreignAttributes)
Draw an image at the indicated location. |
protected void |
endTextObject()
Indicates the end of a text object. |
protected void |
endVParea()
Signals exit from a viewport area. |
protected void |
fillRect(float x,
float y,
float width,
float height)
Fill a rectangular area. |
protected IFDocumentNavigationHandler |
getDocumentNavigationHandler()
Returns the document navigation handler if available/supported. |
java.lang.String |
getMimeType()
Get the MIME type of the renderer. |
protected boolean |
hasDocumentNavigation()
Indicates whether document navigation features are supported by the document handler. |
protected void |
lineTo(float x,
float y)
Appends a straight line segment from the current point to (x, y). |
protected void |
moveTo(float x,
float y)
Moves the current point to (x, y), omitting any connecting line segment. |
void |
preparePage(PageViewport page)
This is called if the renderer supports out of order rendering. |
void |
processOffDocumentItem(OffDocumentItem odi)
Tells the renderer to process an item not explicitly placed on the document (e.g., PDF bookmarks). |
protected void |
renderBlock(Block block)
Renders a block area. |
protected void |
renderBlockViewport(BlockViewport bv,
java.util.List children)
Renders a block viewport. |
protected void |
renderBookmarkTree(BookmarkData bookmarks)
Renders a Bookmark-Tree object |
void |
renderForeignObject(ForeignObject fo,
java.awt.geom.Rectangle2D pos)
Renders a foreign object area. |
void |
renderImage(Image image,
java.awt.geom.Rectangle2D pos)
Renders an image area. |
protected void |
renderInlineArea(InlineArea inlineArea)
Render the given InlineArea. |
void |
renderInlineParent(InlineParent ip)
Render the given InlineParent. |
void |
renderInlineViewport(InlineViewport viewport)
Render an inline viewport. |
void |
renderLeader(Leader area)
Render the given Leader. |
void |
renderPage(PageViewport page)
Tells the renderer to render a particular page. |
protected void |
renderRegionViewport(RegionViewport viewport)
Renders a region viewport. |
protected void |
renderSpace(SpaceArea space)
Render the given SpaceArea. |
protected void |
renderText(TextArea text)
Render the given TextArea. |
protected void |
renderWord(WordArea word)
Render the given WordArea. |
protected void |
restoreGraphicsState()
Restores the last graphics state of the rendering engine. |
protected void |
restoreStateStackAfterBreakOut(java.util.List breakOutList)
Restores the state stack after a break out. |
protected void |
saveGraphicsState()
Saves the graphics state of the rendering engine. |
void |
setDocumentHandler(IFDocumentHandler documentHandler)
Sets the IFDocumentHandler to be used by the IFRenderer. |
void |
setDocumentLocale(java.util.Locale locale)
|
void |
setupFontInfo(FontInfo inFontInfo)
Set up the given FontInfo. |
void |
startPageSequence(PageSequence pageSequence)
Tells the renderer that a new page sequence starts. |
void |
startRenderer(java.io.OutputStream outputStream)
Initiates the rendering phase. |
protected void |
startVParea(CTM ctm,
java.awt.Rectangle clippingRect)
Establishes a new viewport area. |
void |
stopRenderer()
Signals the end of the rendering phase. |
boolean |
supportsOutOfOrder()
Check if this renderer supports out of order rendering. |
protected void |
updateColor(java.awt.Color col,
boolean fill)
Establishes a new foreground or fill color. |
| Methods inherited from class org.apache.fop.render.AbstractPathOrientedRenderer |
|---|
drawBackAndBorders, drawBackAndBorders, drawBackground, drawBackground, drawBorders, drawImage, establishTransformationMatrix, handleBlockTraits, handleRegionTraits, renderFlow, renderInlineAreaBackAndBorders, renderReferenceArea, renderTextDecoration |
| Methods inherited from class org.apache.fop.render.PrintRenderer |
|---|
addFontList, createRendererContext, getFontFromArea, getFontInfo, getFontList, getFontResolver, getInternalFontNameForArea, instantiateRendererContext, renderDocument, setFontList |
| Methods inherited from class org.apache.fop.render.AbstractRenderer |
|---|
convertTitleToString, getCurrentPageViewport, getGraphics2DAdapter, getImageAdapter, getUserAgent, mptToPt, ptToMpt, renderBeforeFloat, renderBlocks, renderBodyRegion, renderContainer, renderFootnote, renderInlineBlockParent, renderInlineSpace, renderLineArea, renderMainReference, renderPageAreas, renderRegion, renderXML, startPageSequence |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.commons.logging.Log log
public static final java.lang.String IF_MIME_TYPE
protected Renderer mimic
protected java.util.Map pageIndices
| Constructor Detail |
|---|
public IFRenderer(FOUserAgent userAgent)
userAgent - the user agent that contains configuration details. This cannot be null.| Method Detail |
|---|
public java.lang.String getMimeType()
public void setDocumentHandler(IFDocumentHandler documentHandler)
IFDocumentHandler to be used by the IFRenderer.
documentHandler - the IFDocumentHandler
public void setupFontInfo(FontInfo inFontInfo)
throws FOPException
setupFontInfo in interface RenderersetupFontInfo in class PrintRendererinFontInfo - The font information
FOPException - if an error occurs while setting up the font info objectpublic boolean supportsOutOfOrder()
supportsOutOfOrder in interface RenderersupportsOutOfOrder in class AbstractRendererprotected IFDocumentNavigationHandler getDocumentNavigationHandler()
protected boolean hasDocumentNavigation()
protected IFDocumentHandler createDefaultDocumentHandler()
IFDocumentHandler when none has been set.
public void startRenderer(java.io.OutputStream outputStream)
throws java.io.IOException
startRenderer in interface RendererstartRenderer in class AbstractRendereroutputStream - The OutputStream to use for output
java.io.IOException - If an I/O error occurs
public void stopRenderer()
throws java.io.IOException
stopRenderer in interface RendererstopRenderer in class AbstractRendererjava.io.IOException - If an I/O error occurspublic void setDocumentLocale(java.util.Locale locale)
AbstractRenderer
setDocumentLocale in interface RenderersetDocumentLocale in class AbstractRendererlocale - Locale of the languagepublic void processOffDocumentItem(OffDocumentItem odi)
processOffDocumentItem in interface RendererprocessOffDocumentItem in class AbstractRendererodi - The off-document item to be renderedprotected void renderBookmarkTree(BookmarkData bookmarks)
bookmarks - the BookmarkData object containing all the Bookmark-Itemspublic void startPageSequence(PageSequence pageSequence)
startPageSequence in interface RendererstartPageSequence in class AbstractRendererpageSequence - the page sequencepublic void preparePage(PageViewport page)
Renderer.renderPage(PageViewport).
preparePage in interface RendererpreparePage in class AbstractRendererpage - The page viewport to use
public void renderPage(PageViewport page)
throws java.io.IOException,
FOPException
renderPage in interface RendererrenderPage in class AbstractRendererpage - The page to be rendered
java.io.IOException - if an I/O error occurs
FOPException - if a FOP interal error occurs.protected void saveGraphicsState()
saveGraphicsState in class AbstractPathOrientedRendererprotected void restoreGraphicsState()
restoreGraphicsState in class AbstractPathOrientedRendererprotected java.util.List breakOutOfStateStack()
breakOutOfStateStack in class AbstractPathOrientedRendererprotected void restoreStateStackAfterBreakOut(java.util.List breakOutList)
restoreStateStackAfterBreakOut in class AbstractPathOrientedRendererbreakOutList - the state stack to restore.protected void concatenateTransformationMatrix(java.awt.geom.AffineTransform at)
concatenateTransformationMatrix in class AbstractPathOrientedRendererat - the transformation matrix to process (coordinates in points)protected void beginTextObject()
beginTextObject in class AbstractPathOrientedRendererprotected void endTextObject()
endTextObject in class AbstractPathOrientedRendererprotected void renderRegionViewport(RegionViewport viewport)
The region may clip the area and it establishes a position from where the region is placed.
renderRegionViewport in class AbstractRendererviewport - The region viewport to be rendered
protected void renderBlockViewport(BlockViewport bv,
java.util.List children)
renderBlockViewport in class AbstractPathOrientedRendererbv - The block viewportchildren - The children to render within the block viewportpublic void renderInlineViewport(InlineViewport viewport)
renderInlineViewport in class AbstractPathOrientedRendererviewport - the viewport to handle
protected void startVParea(CTM ctm,
java.awt.Rectangle clippingRect)
startVParea in class AbstractRendererctm - the coordinate transformation matrix to useclippingRect - the clipping rectangle if the viewport should be clipping,
null if no clipping is performed.protected void endVParea()
endVParea in class AbstractRendererprotected void renderInlineArea(InlineArea inlineArea)
renderInlineArea in class AbstractRendererinlineArea - inline area text to renderpublic void renderInlineParent(InlineParent ip)
renderInlineParent in class AbstractRendererip - the inline parent to renderprotected void renderBlock(Block block)
renderBlock in class AbstractRendererblock - The block areaprotected void renderText(TextArea text)
renderText in class AbstractRenderertext - the text to renderprotected void renderWord(WordArea word)
renderWord in class AbstractRendererword - the word to renderprotected void renderSpace(SpaceArea space)
renderSpace in class AbstractRendererspace - the space to render
public void renderImage(Image image,
java.awt.geom.Rectangle2D pos)
renderImage in class AbstractRendererimage - The imagepos - The target position of the image
(todo) Make renderImage() protected
protected void drawImage(java.lang.String uri,
java.awt.geom.Rectangle2D pos,
java.util.Map foreignAttributes)
drawImage in class AbstractPathOrientedRendereruri - the URI/URL of the imagepos - the position of the imageforeignAttributes - an optional Map with foreign attributes, may be null
public void renderForeignObject(ForeignObject fo,
java.awt.geom.Rectangle2D pos)
renderForeignObject in class AbstractPathOrientedRendererfo - The foreign object areapos - The target position of the foreign object
(todo) Make renderForeignObject() protectedpublic void renderLeader(Leader area)
renderLeader in class AbstractRendererarea - the leader to renderprotected void clip()
clip in class AbstractPathOrientedRenderer
protected void clipRect(float x,
float y,
float width,
float height)
clipRect in class AbstractPathOrientedRendererx - the x coordinate (in points)y - the y coordinate (in points)width - the width of the rectangle (in points)height - the height of the rectangle (in points)protected void closePath()
closePath in class AbstractPathOrientedRenderer
protected void drawBorders(float startx,
float starty,
float width,
float height,
BorderProps bpsBefore,
BorderProps bpsAfter,
BorderProps bpsStart,
BorderProps bpsEnd,
int level)
drawBorders in class AbstractPathOrientedRendererstartx - the start x positionstarty - the start y positionwidth - the width of the areaheight - the height of the areabpsBefore - the border traits associated with before edgebpsAfter - the border traits associated with after edgebpsStart - the border traits associated with start edgebpsEnd - the border traits associated with end edgelevel - of bidirectional embedding
protected void drawBorderLine(float x1,
float y1,
float x2,
float y2,
boolean horz,
boolean startOrBefore,
int style,
java.awt.Color col)
drawBorderLine in class AbstractPathOrientedRendererx1 - starting x coordinatey1 - starting y coordinatex2 - ending x coordinatey2 - ending y coordinatehorz - true for horizontal border segments, false for vertical border segmentsstartOrBefore - true for border segments on the start or before edge,
false for end or after.style - the border style (one of Constants.EN_DASHED etc.)col - the color for the border segment
protected void fillRect(float x,
float y,
float width,
float height)
fillRect in class AbstractPathOrientedRendererx - the x coordinatey - the y coordinatewidth - the width of the rectangleheight - the height of the rectangle
protected void moveTo(float x,
float y)
moveTo in class AbstractPathOrientedRendererx - x coordinatey - y coordinate
protected void lineTo(float x,
float y)
lineTo in class AbstractPathOrientedRendererx - x coordinatey - y coordinate
protected void updateColor(java.awt.Color col,
boolean fill)
updateColor in class AbstractPathOrientedRenderercol - the color to apply (null skips this operation)fill - true to set the fill color, false for the foreground color
|
fop 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||