|
fop 0.93 | ||||||||||
| 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.txt.TXTRenderer
Renderer that renders areas to plain text.
| Field Summary | |
static int |
CHAR_HEIGHT
Height of one symbol in Courier font size of 10pt. |
static int |
CHAR_WIDTH
Width of one symbol in Courier font size of 10pt. |
| 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 | |
TXTRenderer()
Constructs a newly allocated TXTRenderer object. |
|
| Method Summary | |
protected void |
addChar(int x,
int y,
char ch,
boolean ischar)
Add char to text buffer. |
protected void |
addString(int row,
int col,
java.lang.String s)
Adds string to text buffer ( charData). |
protected void |
beginTextObject()
Does nothing. |
protected java.util.List |
breakOutOfStateStack()
Does nothing. |
protected void |
clip()
Does nothing. |
protected void |
clipRect(float x,
float y,
float width,
float height)
Does nothing. |
protected void |
closePath()
Does nothing. |
void |
configure(org.apache.avalon.framework.configuration.Configuration conf)
|
protected void |
drawBackAndBorders(Area area,
float startx,
float starty,
float width,
float height)
Draw the background and borders. |
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 |
drawImage(java.lang.String url,
java.awt.geom.Rectangle2D pos,
java.util.Map foreignAttributes)
Draw an image at the indicated location. |
protected void |
endTextObject()
Does nothing. |
protected void |
endVParea()
Signals exit from a viewport area. |
protected void |
fillRect(float x,
float y,
float width,
float height)
Fills a rectangular area with the current filling char. |
java.lang.String |
getMimeType()
Get the MIME type of the renderer. |
boolean |
isLayInside(int x,
int y)
Indicates if point (x, y) lay inside currentPage. |
protected void |
lineTo(float x,
float y)
Does nothing. |
protected void |
moveTo(float x,
float y)
Does nothing. |
protected void |
putChar(int x,
int y,
char ch,
boolean ischar)
Add char to text or background buffer. |
void |
renderImage(Image image,
java.awt.geom.Rectangle2D pos)
Fills image rectangle with a IMAGE_CHAR. |
void |
renderPage(PageViewport page)
Tells the renderer to render a particular page. |
protected void |
renderText(TextArea area)
Render TextArea to Text. |
protected void |
restoreGraphicsState()
Does nothing. |
protected void |
restoreStateStackAfterBreakOut(java.util.List breakOutList)
Does nothing. |
protected void |
saveGraphicsState()
Does nothing. |
void |
setEncoding(java.lang.String encoding)
Sets the encoding of the target file. |
void |
startRenderer(java.io.OutputStream os)
Initiates the rendering phase. |
protected void |
startVParea(CTM ctm,
java.awt.geom.Rectangle2D clippingRect)
Establishes a new viewport area. |
void |
stopRenderer()
Signals the end of the rendering phase. |
protected int |
toMilli(float x)
Returns the closest integer to the multiplication of a number and 1000. |
protected void |
updateColor(java.awt.Color col,
boolean fill)
Changes current filling char. |
| Methods inherited from class org.apache.fop.render.AbstractPathOrientedRenderer |
drawBorders, drawImage, handleBlockTraits, handleRegionTraits, renderBlockViewport, renderForeignObject, renderInlineAreaBackAndBorders, renderTextDecoration, renderViewport |
| Methods inherited from class org.apache.fop.render.PrintRenderer |
createRendererContext, getFontFromArea, getInternalFontNameForArea, lightenColor, renderDocument, setupFontInfo |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int CHAR_HEIGHT
public static final int CHAR_WIDTH
| Constructor Detail |
public TXTRenderer()
TXTRenderer object.
| Method Detail |
public java.lang.String getMimeType()
AbstractRenderer
getMimeType in interface RenderergetMimeType in class AbstractRendererAbstractRenderer.getMimeType()
public void configure(org.apache.avalon.framework.configuration.Configuration conf)
throws org.apache.avalon.framework.configuration.ConfigurationException
configure in interface org.apache.avalon.framework.configuration.Configurableconfigure in class AbstractRendererorg.apache.avalon.framework.configuration.ConfigurationExceptionAbstractRendererpublic void setEncoding(java.lang.String encoding)
encoding - the encoding, null to select the default encoding (UTF-8)
public boolean isLayInside(int x,
int y)
x - x coordinatey - y coordinate
protected void addChar(int x,
int y,
char ch,
boolean ischar)
x - x coordinatey - y coordinatech - char to addischar - boolean, repersenting is character adding to text buffer
protected void putChar(int x,
int y,
char ch,
boolean ischar)
x - x coordinatey - x coordinatech - char to addischar - indicates if it char or background
protected void addString(int row,
int col,
java.lang.String s)
charData). Chars of string map in turn.
row - x coordinatecol - y coordinates - string to addprotected void renderText(TextArea area)
renderText in class AbstractRendererarea - inline area to render
public void renderPage(PageViewport page)
throws java.io.IOException,
FOPException
Renderer
renderPage in interface RendererrenderPage in class AbstractRendererjava.io.IOException
FOPExceptionRenderer.renderPage(PageViewport)
public void startRenderer(java.io.OutputStream os)
throws java.io.IOException
Renderer
startRenderer in interface RendererstartRenderer in class AbstractRendererjava.io.IOExceptionRenderer.startRenderer(java.io.OutputStream)
public void stopRenderer()
throws java.io.IOException
Renderer
stopRenderer in interface RendererstopRenderer in class AbstractRendererjava.io.IOExceptionRenderer.stopRenderer()protected void restoreStateStackAfterBreakOut(java.util.List breakOutList)
restoreStateStackAfterBreakOut in class AbstractPathOrientedRendererbreakOutList - the state stack to restore.AbstractPathOrientedRendererprotected java.util.List breakOutOfStateStack()
breakOutOfStateStack in class AbstractPathOrientedRendererAbstractPathOrientedRendererprotected void saveGraphicsState()
saveGraphicsState in class AbstractPathOrientedRendererAbstractPathOrientedRendererprotected void restoreGraphicsState()
restoreGraphicsState in class AbstractPathOrientedRendererAbstractPathOrientedRendererprotected void beginTextObject()
beginTextObject in class AbstractPathOrientedRendererAbstractPathOrientedRendererprotected void endTextObject()
endTextObject in class AbstractPathOrientedRendererAbstractPathOrientedRendererprotected void clip()
clip in class AbstractPathOrientedRendererAbstractPathOrientedRenderer
protected void clipRect(float x,
float y,
float width,
float height)
clipRect in class AbstractPathOrientedRendererx - the x coordinatey - the y coordinatewidth - the width of the rectangleheight - the height of the rectangleAbstractPathOrientedRenderer
protected void moveTo(float x,
float y)
moveTo in class AbstractPathOrientedRendererx - x coordinatey - y coordinateAbstractPathOrientedRenderer
protected void lineTo(float x,
float y)
lineTo in class AbstractPathOrientedRendererx - x coordinatey - y coordinateAbstractPathOrientedRendererprotected void closePath()
closePath in class AbstractPathOrientedRendererAbstractPathOrientedRenderer
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 rectangleAbstractPathOrientedRenderer
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 colorAbstractPathOrientedRenderer
protected void drawImage(java.lang.String url,
java.awt.geom.Rectangle2D pos,
java.util.Map foreignAttributes)
AbstractPathOrientedRenderer
drawImage in class AbstractPathOrientedRendererurl - the URI/URL of the imagepos - the position of the imageforeignAttributes - an optional Map with foreign attributes, may be nullAbstractPathOrientedRenderer.drawImage(
java.lang.String, java.awt.geom.Rectangle2D, java.util.Map)
public void renderImage(Image image,
java.awt.geom.Rectangle2D pos)
IMAGE_CHAR.
renderImage in class AbstractRendererimage - The imagepos - The target position of the image
(todo) Make renderImage() protectedAbstractPathOrientedRendererprotected int toMilli(float x)
x - the value of the argument, multiplied by
1000 and rounded
protected void drawBorderLine(float x1,
float y1,
float x2,
float y2,
boolean horz,
boolean startOrBefore,
int style,
java.awt.Color col)
AbstractPathOrientedRenderer
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 segmentAbstractPathOrientedRenderer
protected void drawBackAndBorders(Area area,
float startx,
float starty,
float width,
float height)
AbstractPathOrientedRenderer
drawBackAndBorders in class AbstractPathOrientedRendererarea - the area to get the traits fromstartx - the start x positionstarty - the start y positionwidth - the width of the areaheight - the height of the areaAbstractPathOrientedRenderer
protected void startVParea(CTM ctm,
java.awt.geom.Rectangle2D clippingRect)
AbstractRenderer
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.AbstractRenderer.startVParea(CTM, Rectangle2D)protected void endVParea()
AbstractRenderer
endVParea in class AbstractRendererAbstractRenderer.endVParea()
|
fop 0.93 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||