|
fop 0.95 | ||||||||||
| 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
Abstract base class for renderers like PDF and PostScript where many painting operations follow similar patterns which makes it possible to share some code.
| Field Summary |
| Fields inherited from class org.apache.fop.render.PrintRenderer |
fontInfo, fontList, fontResolver |
| Fields inherited from class org.apache.fop.render.AbstractRenderer |
containingBPPosition, containingIPPosition, currentBPPosition, currentIPPosition, currentPageViewport, log, userAgent |
| Fields inherited from interface org.apache.fop.render.Renderer |
ROLE |
| Constructor Summary | |
AbstractPathOrientedRenderer()
|
|
| Method Summary | |
protected abstract void |
beginTextObject()
Indicates the beginning of a text object. |
protected abstract java.util.List |
breakOutOfStateStack()
Breaks out of the state stack to handle fixed block-containers. |
protected abstract void |
clip()
Clip using the current path. |
protected abstract void |
clipRect(float x,
float y,
float width,
float height)
Clip using a rectangular area. |
protected abstract void |
closePath()
Closes the current subpath by appending a straight line segment from the current point to the starting point of the subpath. |
protected abstract void |
concatenateTransformationMatrix(java.awt.geom.AffineTransform at)
Concatenates the current transformation matrix with the given one, therefore establishing a new coordinate system. |
protected void |
drawBackAndBorders(Area area,
float startx,
float starty,
float width,
float height)
Draw the background and borders. |
protected abstract 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(java.awt.geom.Rectangle2D.Float borderRect,
BorderProps bpsBefore,
BorderProps bpsAfter,
BorderProps bpsStart,
BorderProps bpsEnd)
Draws borders. |
protected void |
drawImage(java.lang.String url,
java.awt.geom.Rectangle2D pos)
Draw an image at the indicated location. |
protected abstract void |
drawImage(java.lang.String url,
java.awt.geom.Rectangle2D pos,
java.util.Map foreignAttributes)
Draw an image at the indicated location. |
protected abstract void |
endTextObject()
Indicates the end of a text object. |
protected abstract void |
fillRect(float x,
float y,
float width,
float height)
Fill a rectangular area. |
protected void |
handleBlockTraits(Block block)
Handle block traits. |
protected void |
handleRegionTraits(RegionViewport region)
Handle the traits for a region This is used to draw the traits for the given page region. |
protected abstract void |
lineTo(float x,
float y)
Appends a straight line segment from the current point to (x, y). |
protected abstract void |
moveTo(float x,
float y)
Moves the current point to (x, y), omitting any connecting line segment. |
protected void |
renderBlockViewport(BlockViewport bv,
java.util.List children)
Renders a block viewport. |
protected void |
renderFlow(NormalFlow flow)
Renders a flow reference area. |
void |
renderForeignObject(ForeignObject fo,
java.awt.geom.Rectangle2D pos)
Renders a foreign object area. |
protected void |
renderInlineAreaBackAndBorders(InlineArea area)
Common method to render the background and borders for any inline area. |
protected void |
renderReferenceArea(Block block)
Renders a block area that represents a reference area. The reference area establishes a new coordinate system. |
protected void |
renderTextDecoration(FontMetrics fm,
int fontsize,
InlineArea inline,
int baseline,
int startx)
Paints the text decoration marks. |
void |
renderViewport(Viewport viewport)
Render an inline viewport. |
protected abstract void |
restoreGraphicsState()
Restores the last graphics state of the rendering engine. |
protected abstract void |
restoreStateStackAfterBreakOut(java.util.List breakOutList)
Restores the state stack after a break out. |
protected abstract void |
saveGraphicsState()
Saves the graphics state of the rendering engine. |
protected abstract void |
updateColor(java.awt.Color col,
boolean fill)
Establishes a new foreground or fill color. |
| Methods inherited from class org.apache.fop.render.PrintRenderer |
addFontList, createRendererContext, getFontFromArea, getFontResolver, getInternalFontNameForArea, lightenColor, renderDocument, setFontList, setupFontInfo |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractPathOrientedRenderer()
| Method Detail |
protected void handleBlockTraits(Block block)
handleBlockTraits in class AbstractRendererblock - the block to render the traitsprotected void handleRegionTraits(RegionViewport region)
handleRegionTraits in class AbstractRendererregion - the RegionViewport whose region is to be drawn
protected void drawBackAndBorders(Area area,
float startx,
float starty,
float width,
float height)
area - the area to get the traits fromstartx - the start x positionstarty - the start y positionwidth - the width of the areaheight - the height of the area
protected void drawBorders(java.awt.geom.Rectangle2D.Float borderRect,
BorderProps bpsBefore,
BorderProps bpsAfter,
BorderProps bpsStart,
BorderProps bpsEnd)
borderRect - the border rectanglebpsBefore - the border specification on the before sidebpsAfter - the border specification on the after sidebpsStart - the border specification on the start sidebpsEnd - the border specification on the end sideprotected void renderInlineAreaBackAndBorders(InlineArea area)
renderInlineAreaBackAndBorders in class AbstractRendererarea - the inline area for which the background, border and padding is to be
rendered
protected void renderBlockViewport(BlockViewport bv,
java.util.List children)
renderBlockViewport in class AbstractRendererbv - The block viewportchildren - The children to render within the block viewportprotected void renderReferenceArea(Block block)
renderReferenceArea in class AbstractRendererblock - the block areaprotected void renderFlow(NormalFlow flow)
renderFlow in class AbstractRendererflow - The flow reference areaprotected abstract void concatenateTransformationMatrix(java.awt.geom.AffineTransform at)
at - the transformation matrix to process (coordinates in points)public void renderViewport(Viewport viewport)
renderViewport in class AbstractRendererviewport - the viewport to handleprotected abstract void restoreStateStackAfterBreakOut(java.util.List breakOutList)
breakOutList - the state stack to restore.protected abstract java.util.List breakOutOfStateStack()
protected abstract void saveGraphicsState()
protected abstract void restoreGraphicsState()
protected abstract void beginTextObject()
protected abstract void endTextObject()
protected void renderTextDecoration(FontMetrics fm,
int fontsize,
InlineArea inline,
int baseline,
int startx)
fm - Current typefacefontsize - Current font sizeinline - inline area to paint the marks forbaseline - position of the baselinestartx - start IPDprotected abstract void clip()
protected abstract void clipRect(float x,
float y,
float width,
float height)
x - 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 abstract void moveTo(float x,
float y)
x - x coordinatey - y coordinate
protected abstract void lineTo(float x,
float y)
x - x coordinatey - y coordinateprotected abstract void closePath()
protected abstract void fillRect(float x,
float y,
float width,
float height)
x - the x coordinatey - the y coordinatewidth - the width of the rectangleheight - the height of the rectangle
protected abstract void updateColor(java.awt.Color col,
boolean fill)
col - the color to apply (null skips this operation)fill - true to set the fill color, false for the foreground color
protected abstract void drawImage(java.lang.String url,
java.awt.geom.Rectangle2D pos,
java.util.Map foreignAttributes)
url - the URI/URL of the imagepos - the position of the imageforeignAttributes - an optional Map with foreign attributes, may be null
protected final void drawImage(java.lang.String url,
java.awt.geom.Rectangle2D pos)
url - the URI/URL of the imagepos - the position of the image
protected abstract void drawBorderLine(float x1,
float y1,
float x2,
float y2,
boolean horz,
boolean startOrBefore,
int style,
java.awt.Color col)
x1 - 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
public void renderForeignObject(ForeignObject fo,
java.awt.geom.Rectangle2D pos)
renderForeignObject in class AbstractRendererfo - The foreign object areapos - The target position of the foreign object
(todo) Make renderForeignObject() protected
|
fop 0.95 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||