|
fop 1.0 | ||||||||||
| 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
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()
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)
Draw the borders. This draws the border traits given the position and the traits. |
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. Subclasses can restore transformation matrices valid before the viewport area was started. |
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). The new current point is (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. The renderer should prepare the page so that a page further on in the set of pages can be rendered. The body of the page should not be rendered. The page will be rendered at a later time by the call to Renderer.renderPage(PageViewport). |
void |
processOffDocumentItem(OffDocumentItem odi)
Tells the renderer to process an item not explicitly placed on the document (e.g., PDF bookmarks). Note - not all renderers will process all off-document items. |
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 |
renderLeader(Leader area)
Render the given Leader. |
void |
renderPage(PageViewport page)
Tells the renderer to render a particular page. A renderer typically reponds by packing up the current page and writing it immediately to the output device. |
protected void |
renderRegionViewport(RegionViewport viewport)
Renders a region viewport. The region may clip the area and it establishes a position from where the region is placed. |
protected void |
renderSpace(SpaceArea space)
Render the given SpaceArea. |
protected void |
renderText(java.lang.String s,
int[] letterAdjust,
Font font,
AbstractTextArea parentArea)
Does low-level rendering of text. |
protected void |
renderText(TextArea text)
Render the given TextArea. |
void |
renderViewport(Viewport viewport)
Render an inline viewport. This renders an inline viewport by clipping if necessary. |
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 |
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. This must only be called once for a rendering. If stopRenderer is called then this may be called again for a new document rendering. |
protected void |
startVParea(CTM ctm,
java.awt.geom.Rectangle2D clippingRect)
Establishes a new viewport area. |
void |
stopRenderer()
Signals the end of the rendering phase. The renderer should reset to an initial state and dispose of any resources for the completed rendering. |
boolean |
supportsOutOfOrder()
Check if this renderer supports out of order rendering. If this renderer supports out of order rendering then it means that the pages that are not ready will be prepared and a future page will be rendered. |
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, 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, setUserAgent, startPageSequence |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static 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()
| 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 PrintRendererFOPExceptionpublic 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 AbstractRendererjava.io.IOException
public void stopRenderer()
throws java.io.IOException
stopRenderer in interface RendererstopRenderer in class AbstractRendererjava.io.IOExceptionpublic void processOffDocumentItem(OffDocumentItem odi)
processOffDocumentItem in interface RendererprocessOffDocumentItem in class AbstractRendererprotected void renderBookmarkTree(BookmarkData bookmarks)
bookmarks - the BookmarkData object containing all the Bookmark-Itemspublic void startPageSequence(PageSequence pageSequence)
startPageSequence in interface RendererstartPageSequence in class AbstractRendererpublic void preparePage(PageViewport page)
Renderer.renderPage(PageViewport).
preparePage in interface RendererpreparePage in class AbstractRenderer
public void renderPage(PageViewport page)
throws java.io.IOException,
FOPException
renderPage in interface RendererrenderPage in class AbstractRendererjava.io.IOException
FOPExceptionprotected 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 AbstractPathOrientedRendererpublic void renderViewport(Viewport viewport)
renderViewport in class AbstractPathOrientedRendererviewport - the viewport to handle
protected void startVParea(CTM ctm,
java.awt.geom.Rectangle2D 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
protected void renderText(java.lang.String s,
int[] letterAdjust,
Font font,
AbstractTextArea parentArea)
s - text to renderletterAdjust - an array of widths for letter adjustment (may be null)font - to font in useparentArea - the parent text area to retrieve certain traits from
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 AbstractPathOrientedRendererpublic 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)
drawBorders in class AbstractPathOrientedRendererstartx - the start x positionstarty - the start y positionwidth - the width of the areaheight - the height of the areabpsBefore - the border-before traitsbpsAfter - the border-after traitsbpsStart - the border-start traitsbpsEnd - the border-end traits
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.0 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||