|
||||||||||
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.ps.PSRenderer
public class PSRenderer
Renderer that renders to PostScript.
This class currently generates PostScript Level 2 code. The only exception
is the FlateEncode filter which is a Level 3 feature. The PostScript code
generated follows the Document Structuring Conventions (DSC) version 3.0.
Field Summary | |
---|---|
protected Map |
options
|
protected PSStream |
out
the stream used to output the PostScript |
protected String |
producer
the application producing the PostScript |
Fields inherited from class org.apache.fop.render.AbstractRenderer |
---|
currentAreaContainerXPosition, currentXPosition, currentYPosition, idReferences, log |
Constructor Summary | |
---|---|
PSRenderer()
|
Method Summary | |
---|---|
protected void |
addFilledRect(int x,
int y,
int w,
int h,
ColorType col)
Add a filled rectangle to the current stream This default implementation calls addRect using the same color for fill and border. |
protected void |
comment(String comment)
write out a comment |
protected void |
doFrame(Area area)
|
protected void |
drawImageClipped(int x,
int y,
int clipX,
int clipY,
int clipW,
int clipH,
FopImage image,
FontState fs)
Renders an image, clipping it as specified. |
protected void |
drawImageScaled(int x,
int y,
int w,
int h,
FopImage image,
FontState fs)
Renders an image, scaling it to the given width and height. |
int |
getPSLevel()
|
boolean |
isAutoRotateLandscape()
|
protected void |
movetoCurrPosition()
|
void |
render(Page page,
OutputStream outputStream)
render the given area tree to the given stream |
void |
renderBitmap(FopImage img,
int x,
int y,
int w,
int h)
|
void |
renderDisplaySpace(DisplaySpace space)
render a display space to PostScript |
void |
renderEPS(FopImage img,
int x,
int y,
int w,
int h)
|
void |
renderForeignObjectArea(ForeignObjectArea area)
render a foreign object area |
void |
renderImageArea(ImageArea area)
Render an image area. |
void |
renderInlineSpace(InlineSpace space)
render an inline space to PostScript |
void |
renderLeaderArea(LeaderArea area)
render a leader area to PostScript |
void |
renderLineArea(LineArea area)
render a line area to PostScript |
void |
renderPage(Page page)
render a page to PostScript |
void |
renderSVGArea(SVGArea area)
render an SVG area to PostScript |
protected void |
renderSVGDocument(Document doc,
int x,
int y,
FontState fs)
render SVG document to PostScript |
void |
renderWordArea(WordArea area)
render an inline area to PostScript |
void |
setAutoRotateLandscape(boolean value)
|
void |
setOptions(Map options)
set up renderer options |
void |
setProducer(String producer)
set the document's producer |
void |
setPSLevel(int level)
Sets the PostScript Level to generate. |
void |
setupFontInfo(FontInfo fontInfo)
set up the font info |
void |
startRenderer(OutputStream outputStream)
Default start renderer method. |
void |
stopRenderer(OutputStream outputStream)
Default stop renderer method. |
void |
useFont(String name,
int size)
|
protected void |
write(String cmd)
write out a command |
protected void |
writeFontDict(FontInfo fontInfo)
|
protected void |
writeProcs()
|
Methods inherited from class org.apache.fop.render.AbstractRenderer |
---|
doBackground, drawImage, getIDReferences, renderAreaContainer, renderBlockArea, renderBodyAreaContainer, renderRegionAreaContainer, renderRegions, renderSpanArea, setLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String producer
protected PSStream out
protected Map options
Constructor Detail |
---|
public PSRenderer()
Method Detail |
---|
public void setProducer(String producer)
producer
- string indicating application producing the PostScriptpublic void setOptions(Map options)
public void setPSLevel(int level)
level
- You can specify either 2 or 3 for the PostScript Levelpublic int getPSLevel()
public void setAutoRotateLandscape(boolean value)
public boolean isAutoRotateLandscape()
protected void write(String cmd)
protected void comment(String comment)
protected void writeProcs()
protected void writeFontDict(FontInfo fontInfo)
protected void movetoCurrPosition()
public void setupFontInfo(FontInfo fontInfo) throws FOPException
fontInfo
- the font info object to set up
FOPException
protected void addFilledRect(int x, int y, int w, int h, ColorType col)
AbstractRenderer
addFilledRect
in class AbstractRenderer
x
- the x position of left edge in millipointsy
- the y position of top edge in millipointsw
- the width in millipointsh
- the height in millipointspublic void renderDisplaySpace(DisplaySpace space)
space
- the space to renderpublic void renderForeignObjectArea(ForeignObjectArea area)
public void renderSVGArea(SVGArea area)
area
- the area to renderprotected void renderSVGDocument(Document doc, int x, int y, FontState fs)
doc
- the document to renderx
- the x offsety
- the y offsetfs
- the fontstate to useprotected void drawImageScaled(int x, int y, int w, int h, FopImage image, FontState fs)
drawImageScaled
in class AbstractRenderer
x
- the x position of left edge in millipointsy
- the y position of top edge in millipointsw
- the width in millipointsh
- the height in millipointsimage
- the image to be renderedfs
- the font state to use when rendering text
in non-bitmapped images.protected void drawImageClipped(int x, int y, int clipX, int clipY, int clipW, int clipH, FopImage image, FontState fs)
drawImageClipped
in class AbstractRenderer
x
- the x position of left edge in millipoints.y
- the y position of top edge in millipoints.clipX
- the left edge of the clip in millipointsclipY
- the top edge of the clip in millipointsclipW
- the clip width in millipointsclipH
- the clip height in millipointsimage
- the image to be renderedfs
- the font state to use when rendering text
in non-bitmapped images.public void renderEPS(FopImage img, int x, int y, int w, int h)
public void renderBitmap(FopImage img, int x, int y, int w, int h)
public void renderImageArea(ImageArea area)
renderImageArea
in interface Renderer
renderImageArea
in class AbstractRenderer
area
- the image area to renderpublic void renderWordArea(WordArea area)
area
- the area to renderpublic void useFont(String name, int size)
public void renderInlineSpace(InlineSpace space)
space
- the space to renderpublic void renderLineArea(LineArea area)
renderLineArea
in interface Renderer
renderLineArea
in class AbstractRenderer
area
- the area to renderpublic void renderPage(Page page)
page
- the page to renderpublic void renderLeaderArea(LeaderArea area)
area
- the area to renderprotected void doFrame(Area area)
doFrame
in class AbstractRenderer
public void startRenderer(OutputStream outputStream) throws IOException
IOException
public void stopRenderer(OutputStream outputStream) throws IOException
IOException
public void render(Page page, OutputStream outputStream)
Renderer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |