fop 0.95beta | |
Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.apache.fop.render.AbstractRenderer
org.apache.fop.render.PrintRenderer
org.apache.fop.render.AbstractPathOrientedRenderer
org.apache.fop.render.ps.PSRenderer
public class PSRenderer
extends AbstractPathOrientedRenderer
implements ImageAdapter, PSSupportedFlavors
Field Summary | |
static String |
|
protected PSGenerator |
|
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.ps.PSSupportedFlavors | |
LEVEL_2_FLAVORS_FORM , LEVEL_2_FLAVORS_INLINE , LEVEL_3_FLAVORS_FORM , LEVEL_3_FLAVORS_INLINE |
Method Summary | |
protected void |
|
protected List | |
protected void |
|
protected void |
|
protected void | |
protected void |
|
protected void |
|
protected void |
|
protected void |
|
protected RendererContext |
|
protected void |
|
protected void |
|
protected void |
|
protected void |
|
protected void | |
protected void |
|
protected PSResource |
|
Graphics2DAdapter | |
ImageAdapter | |
int |
|
String | |
protected PSResource |
|
protected void |
|
boolean | |
protected boolean |
|
protected boolean |
|
boolean | |
protected void |
|
protected void |
|
protected void |
|
void |
|
void | |
protected void |
|
void |
|
protected void | |
void |
|
void |
|
protected void | |
protected void |
|
void |
|
protected void |
|
void |
|
protected void |
|
protected void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
protected void |
|
void | |
protected void |
|
protected void |
|
protected void |
|
Methods inherited from class org.apache.fop.render.PrintRenderer | |
addFontList , createRendererContext , getFontFromArea , getFontResolver , getInternalFontNameForArea , lightenColor , renderDocument , setFontList , setupFontInfo |
public static final String MIME_TYPE
The MIME type for PostScript
protected PSGenerator gen
The PostScript generator used to output the PostScript
protected void beginTextObject()
Indicates the beginning of a text object.
- Overrides:
- beginTextObject in interface AbstractPathOrientedRenderer
protected List breakOutOfStateStack()
- Overrides:
- breakOutOfStateStack in interface AbstractPathOrientedRenderer
protected void clipRect(float x, float y, float width, float height)
- Overrides:
- clipRect in interface AbstractPathOrientedRenderer
protected void comment(String comment)
Write out a comment
- Parameters:
comment
- Comment to write
protected void concatMatrix(double a, double b, double c, double d, double e, double f)
Concats the transformation matrix.
- Parameters:
a
- A partb
- B partc
- C partd
- D parte
- E partf
- F part
protected void concatMatrix(double[] matrix)
Concats the transformations matrix.
- Parameters:
matrix
- Matrix to use
protected void concatenateTransformationMatrix(AffineTransform at)
- Overrides:
- concatenateTransformationMatrix in interface AbstractPathOrientedRenderer
protected RendererContext createRendererContext(int x, int y, int width, int height, Map foreignAttributes)
- Overrides:
- createRendererContext in interface PrintRenderer
protected void drawBackAndBorders(Area area, float startx, float starty, float width, float height)
Area, float, float, float, float)
- Overrides:
- drawBackAndBorders in interface AbstractPathOrientedRenderer
protected void drawBorderLine(float x1, float y1, float x2, float y2, boolean horz, boolean startOrBefore, int style, Color col)
- Overrides:
- drawBorderLine in interface AbstractPathOrientedRenderer
protected void drawImage(String uri, Rectangle2D pos, Map foreignAttributes)
- Overrides:
- drawImage in interface AbstractPathOrientedRenderer
protected void endTextObject()
Indicates the end of a text object.
- Overrides:
- endTextObject in interface AbstractPathOrientedRenderer
protected void fillRect(float x, float y, float width, float height)
- Overrides:
- fillRect in interface AbstractPathOrientedRenderer
protected PSResource getFormForImage(String uri)
Returns a PSResource instance representing a image as a PostScript form.
- Parameters:
uri
- the image URI
- Returns:
- a PSResource instance
public Graphics2DAdapter getGraphics2DAdapter()
- Specified by:
- getGraphics2DAdapter in interface Renderer
- Overrides:
- getGraphics2DAdapter in interface AbstractRenderer
public ImageAdapter getImageAdapter()
- Specified by:
- getImageAdapter in interface Renderer
- Overrides:
- getImageAdapter in interface AbstractRenderer
public int getLanguageLevel()
Return the PostScript language level that the renderer produces.
- Returns:
- the language level
public String getMimeType()
- Specified by:
- getMimeType in interface Renderer
- Overrides:
- getMimeType in interface AbstractRenderer
protected PSResource getPSResourceForFontKey(String key)
Returns the PSResource for the given font key.
- Parameters:
key
- the font key ("F*")
- Returns:
- the matching PSResource
protected void handleIOTrouble(IOException ioe)
Central exception handler for I/O exceptions.
- Parameters:
ioe
- IOException to handle
public boolean isAutoRotateLandscape()
- Returns:
- true if the renderer is configured to rotate landscape pages
protected boolean isImageInlined(ImageInfo info)
Indicates whether an image should be inlined or added as a PostScript form.
- Parameters:
info
- the ImageInfo object of the image
- Returns:
- true if the image should be inlined rather than added as a form
protected boolean isImageInlined(String uri)
Indicates whether an image should be inlined or added as a PostScript form.
- Parameters:
uri
- the URI of the image
- Returns:
- true if the image should be inlined rather than added as a form
public boolean isOptimizeResources()
- Returns:
- true if the renderer does two passes to optimize PostScript resources
protected void lineTo(float x, float y)
- Overrides:
- lineTo in interface AbstractPathOrientedRenderer
protected void moveTo(float x, float y)
- Overrides:
- moveTo in interface AbstractPathOrientedRenderer
protected void movetoCurrPosition()
Make sure the cursor is in the right place.
public void paintImage(RenderedImage image, RendererContext context, int x, int y, int width, int height) throws IOException
- Specified by:
- paintImage in interface ImageAdapter
public void processOffDocumentItem(OffDocumentItem oDI)
- Specified by:
- processOffDocumentItem in interface Renderer
- Overrides:
- processOffDocumentItem in interface AbstractRenderer
protected void renderBlockViewport(BlockViewport bv, List children)
- Overrides:
- renderBlockViewport in interface AbstractPathOrientedRenderer
public void renderImage(Image image, Rectangle2D pos)
- Overrides:
- renderImage in interface AbstractRenderer
protected void renderInlineParent(InlineParent ip)
- Overrides:
- renderInlineParent in interface AbstractRenderer
public void renderLeader(Leader area)
- Overrides:
- renderLeader in interface AbstractRenderer
public void renderPage(PageViewport page) throws IOException, FOPException
- Specified by:
- renderPage in interface Renderer
- Overrides:
- renderPage in interface AbstractRenderer
protected void renderRegionViewport(RegionViewport port)
- Overrides:
- renderRegionViewport in interface AbstractRenderer
protected void renderSpace(SpaceArea space)
- Overrides:
- renderSpace in interface AbstractRenderer
protected void renderWord(WordArea word)
- Overrides:
- renderWord in interface AbstractRenderer
public void restoreGraphicsState()
Restores the last graphics state of the rendering engine.
- Overrides:
- restoreGraphicsState in interface AbstractPathOrientedRenderer
protected void restoreStateStackAfterBreakOut(List breakOutList)
- Overrides:
- restoreStateStackAfterBreakOut in interface AbstractPathOrientedRenderer
protected void rmoveTo(float x, float y)
Moves the current point by (x, y) relative to the current position, omitting any connecting line segment.
- Parameters:
x
- x coordinatey
- y coordinate
public void saveGraphicsState()
Saves the graphics state of the rendering engine.
- Overrides:
- saveGraphicsState in interface AbstractPathOrientedRenderer
public void setAutoRotateLandscape(boolean value)
Sets the landscape mode for this renderer.
- Parameters:
value
- false will normally generate a "pseudo-portrait" page, true will rotate a "wider-than-long" page by 90 degrees.
public void setDSCCompliant(boolean dscCompliant)
Sets whether or not Dublin Core Standard (dsc) compliance is enforced. It can cause problems (unwanted postscript subsystem initgraphics/erasepage calls) on some printers when the pagedevice is set. If this causes problems on a particular implementation then use this setting with a 'false' value to try and minimize the number of setpagedevice calls in the postscript document output. Set this value to false if you experience unwanted blank pages in your postscript output.
- Parameters:
dscCompliant
- boolean value (default is true)
public void setLanguageLevel(int level)
Sets the PostScript language level that the renderer should produce.
- Parameters:
level
- the language level (currently allowed: 2 or 3)
public void setOptimizeResources(boolean value)
Sets the resource optimization mode. If set to true, the renderer does two passes to only embed the necessary resources in the PostScript file. This is slower, but produces smaller files.
- Parameters:
value
- true to enable the resource optimization
public void setSafeSetPageDevice(boolean safeSetPageDevice)
Sets whether or not the safe set page device macro should be used (as opposed to directly invoking setpagedevice) when setting the postscript page device. This option is a useful option when you want to guard against the possibility of invalid/unsupported postscript key/values being placed in the page device.
- Parameters:
safeSetPageDevice
- setting to false and the renderer will make a standard "setpagedevice" call, setting to true will make a safe set page device macro call (default is false).
public void setUserAgent(FOUserAgent agent)
- Specified by:
- setUserAgent in interface Renderer
- Overrides:
- setUserAgent in interface AbstractRenderer
public void startRenderer(OutputStream outputStream) throws IOException
- Specified by:
- startRenderer in interface Renderer
- Overrides:
- startRenderer in interface AbstractRenderer
protected void startVParea(CTM ctm, Rectangle2D clippingRect)
- Overrides:
- startVParea in interface AbstractRenderer
public void stopRenderer() throws IOException
- Specified by:
- stopRenderer in interface Renderer
- Overrides:
- stopRenderer in interface AbstractRenderer
protected void updateColor(Color col, boolean fill)
- Overrides:
- updateColor in interface AbstractPathOrientedRenderer
protected void useFont(String key, int size)
Changes the currently used font.
- Parameters:
key
- key of the font ("F*")size
- font size
protected void writeln(String cmd)
Write out a command
- Parameters:
cmd
- PostScript command
fop 0.95beta |