|
fop 0.92beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.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.
Fields inherited from class org.apache.fop.render.PrintRenderer |
fontInfo, fontList |
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 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,
ColorType col)
Draw a border segment of an XSL-FO style border. |
protected abstract void |
drawImage(java.lang.String url,
java.awt.geom.Rectangle2D pos)
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 |
renderInlineAreaBackAndBorders(InlineArea area)
Common method to render the background and borders for any inline area. |
protected void |
renderInlineBlockParent(InlineBlockParent ibp)
Render the given InlineBlockParent. |
protected void |
renderInlineParent(InlineParent ip)
Render the given InlineParent. |
protected void |
renderInlineSpace(Space space)
Render the given Space. |
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 java.awt.Color |
toColor(ColorType col)
Converts a ColorType to a java.awt.Color (sRGB). |
protected abstract void |
updateColor(ColorType col,
boolean fill)
Establishes a new foreground or fill color. |
Methods inherited from class org.apache.fop.render.PrintRenderer |
getFontFromArea, getInternalFontNameForArea, lightenColor, 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 java.awt.Color toColor(ColorType col)
col
- the colorprotected void handleBlockTraits(Block block)
handleBlockTraits
in class AbstractRenderer
block
- the block to render the traitsprotected void handleRegionTraits(RegionViewport region)
handleRegionTraits
in class AbstractRenderer
region
- the RegionViewport whose region is to be drawnprotected 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 areaprotected void renderInlineAreaBackAndBorders(InlineArea area)
area
- the inline area for which the background, border and padding is to be
renderedprotected void renderInlineSpace(Space space)
AbstractRenderer
renderInlineSpace
in class AbstractRenderer
AbstractRenderer.renderInlineSpace(Space)
protected void renderInlineParent(InlineParent ip)
AbstractRenderer
renderInlineParent
in class AbstractRenderer
AbstractRenderer.renderInlineParent(InlineParent)
protected void renderInlineBlockParent(InlineBlockParent ibp)
AbstractRenderer
renderInlineBlockParent
in class AbstractRenderer
AbstractRenderer
protected void renderBlockViewport(BlockViewport bv, java.util.List children)
AbstractRenderer
renderBlockViewport
in class AbstractRenderer
AbstractRenderer.renderBlockViewport(BlockViewport, List)
public void renderViewport(Viewport viewport)
renderViewport
in class AbstractRenderer
viewport
- 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 coordinatey
- the y coordinatewidth
- the width of the rectangleheight
- the height of the rectangleprotected abstract void moveTo(float x, float y)
x
- x coordinatey
- y coordinateprotected 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 rectangleprotected abstract void updateColor(ColorType col, boolean fill)
col
- the color to apply (null skips this operation)fill
- true to set the fill color, false for the foreground colorprotected abstract void drawImage(java.lang.String url, java.awt.geom.Rectangle2D pos)
url
- the URI/URL of the imagepos
- the position of the imageprotected abstract void drawBorderLine(float x1, float y1, float x2, float y2, boolean horz, boolean startOrBefore, int style, ColorType 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
|
fop 0.92beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |