|
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.pcl.PCLRenderer
Renderer for the PCL 5 printer language. It also uses HP GL/2 for certain graphic elements.
| Field Summary | |
protected PCLGenerator |
gen
The PCL generator |
static java.lang.String |
MIME_TYPE
The MIME type for PCL |
protected java.io.OutputStream |
out
The OutputStream to write the PCL stream to |
| 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, userAgent |
| Fields inherited from interface org.apache.fop.render.Renderer |
ROLE |
| Constructor Summary | |
PCLRenderer()
Create the PCL renderer |
|
| Method Summary | |
protected void |
clip()
|
protected void |
clipRect(float x,
float y,
float width,
float height)
Clip an area. write a clipping operation given coordinates in the current transform. |
protected void |
closePath()
|
void |
configure(org.apache.avalon.framework.configuration.Configuration cfg)
|
protected void |
drawBackAndBorders(Area area,
float startx,
float starty,
float width,
float height)
Draw the background and borders. |
protected void |
drawBorders(java.awt.geom.Rectangle2D.Float borderRect,
BorderProps bpsBefore,
BorderProps bpsAfter,
BorderProps bpsStart,
BorderProps bpsEnd)
Draws borders. |
protected void |
drawFastBorders(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,
java.util.Map foreignAttributes)
Draw an image at the indicated location. |
protected void |
drawQualityBorders(java.awt.geom.Rectangle2D.Float borderRect,
BorderProps bpsBefore,
BorderProps bpsAfter,
BorderProps bpsStart,
BorderProps bpsEnd)
Draws borders. |
protected void |
endVParea()
Signals exit from a viewport area. |
protected void |
fillRect(float x,
float y,
float width,
float height)
Fill a rectangular area. |
org.apache.xmlgraphics.java2d.GraphicContext |
getGraphicContext()
|
Graphics2DAdapter |
getGraphics2DAdapter()
|
java.lang.String |
getMimeType()
Get the MIME type of the renderer. |
protected int |
getResolution()
|
protected void |
handleBlockTraits(Block block)
Handle block traits. |
protected void |
handleIOTrouble(java.io.IOException ioe)
Central exception handler for I/O exceptions. |
protected void |
lineTo(float x,
float y)
|
protected void |
moveTo(float x,
float y)
|
protected void |
renderBlockViewport(BlockViewport bv,
java.util.List children)
Renders a block viewport. |
void |
renderForeignObject(ForeignObject fo,
java.awt.geom.Rectangle2D pos)
Renders a foreign object area. |
void |
renderImage(Image image,
java.awt.geom.Rectangle2D pos)
Renders an image area. |
protected void |
renderInlineAreaBackAndBorders(InlineArea area)
Common method to render the background and borders for any inline area. |
void |
renderPage(PageViewport page)
Tells the renderer to render a particular page. |
protected void |
renderSpace(SpaceArea space)
Render the given SpaceArea. |
protected void |
renderText(TextArea text)
Render the given TextArea. |
void |
renderViewport(Viewport viewport)
Render an inline viewport. |
protected void |
renderWord(WordArea word)
Render the given WordArea. |
protected void |
restoreGraphicsState()
Restores the last graphics state from the stack. |
protected void |
saveGraphicsState()
Saves the current graphics state on the stack. |
boolean |
setFont(java.lang.String name,
float size,
java.lang.String text)
Sets the current font (NOTE: Hard-coded font mappings ATM!) |
void |
setupFontInfo(FontInfo inFontInfo)
Set up the font info |
void |
startRenderer(java.io.OutputStream outputStream)
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 void |
updateFillColor(java.awt.Color color)
Sets the new current fill color. |
| Methods inherited from class org.apache.fop.render.PrintRenderer |
createRendererContext, getFontFromArea, getInternalFontNameForArea, lightenColor, renderDocument |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String MIME_TYPE
protected java.io.OutputStream out
protected PCLGenerator gen
| Constructor Detail |
public PCLRenderer()
| Method Detail |
public void configure(org.apache.avalon.framework.configuration.Configuration cfg)
throws org.apache.avalon.framework.configuration.ConfigurationException
configure in interface org.apache.avalon.framework.configuration.Configurableconfigure in class AbstractRendererorg.apache.avalon.framework.configuration.ConfigurationExceptionConfigurable.configure(Configuration)public void setupFontInfo(FontInfo inFontInfo)
PrintRenderer
setupFontInfo in interface RenderersetupFontInfo in class PrintRendererinFontInfo - font info to set upRenderer.setupFontInfo(org.apache.fop.fonts.FontInfo)protected void handleIOTrouble(java.io.IOException ioe)
ioe - IOException to handlepublic Graphics2DAdapter getGraphics2DAdapter()
getGraphics2DAdapter in interface RenderergetGraphics2DAdapter in class AbstractRendererRenderer.getGraphics2DAdapter()public org.apache.xmlgraphics.java2d.GraphicContext getGraphicContext()
protected int getResolution()
public boolean setFont(java.lang.String name,
float size,
java.lang.String text)
throws java.io.IOException
name - the font name (internal F* names for now)size - the font sizetext - the text to be rendered (used to determine if there are non-printable chars)
java.io.IOException - if an I/O problem occurs
public void startRenderer(java.io.OutputStream outputStream)
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()public java.lang.String getMimeType()
AbstractRenderer
getMimeType in interface RenderergetMimeType in class AbstractRendererAbstractRenderer
public void renderPage(PageViewport page)
throws java.io.IOException,
FOPException
Renderer
renderPage in interface RendererrenderPage in class AbstractRendererjava.io.IOException
FOPExceptionAbstractRenderer.renderPage(org.apache.fop.area.PageViewport)protected void saveGraphicsState()
protected void restoreGraphicsState()
protected void clipRect(float x,
float y,
float width,
float height)
x - the x coordinatey - the y coordinatewidth - the width of the areaheight - the height of the area
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()protected void handleBlockTraits(Block block)
handleBlockTraits in class AbstractRendererblock - the block to render the traitsprotected void renderText(TextArea text)
AbstractRenderer
renderText in class AbstractRenderertext - the text to renderAbstractRenderer.renderText(TextArea)protected void clip()
AbstractPathOrientedRenderer.clip()protected void closePath()
AbstractPathOrientedRenderer.closePath()
protected void lineTo(float x,
float y)
AbstractPathOrientedRenderer.lineTo(float, float)
protected void moveTo(float x,
float y)
AbstractPathOrientedRenderer.moveTo(float, float)
protected void fillRect(float x,
float y,
float width,
float height)
x - the x coordinate (in pt)y - the y coordinate (in pt)width - the width of the rectangleheight - the height of the rectangleprotected void updateFillColor(java.awt.Color color)
color - the colorprotected void renderWord(WordArea word)
AbstractRenderer
renderWord in class AbstractRendererword - the word to renderAbstractRenderer.renderWord(org.apache.fop.area.inline.WordArea)protected void renderSpace(SpaceArea space)
AbstractRenderer
renderSpace in class AbstractRendererspace - the space to renderAbstractRenderer.renderSpace(org.apache.fop.area.inline.SpaceArea)public void renderViewport(Viewport viewport)
renderViewport in class AbstractRendererviewport - the viewport to handle
protected void renderBlockViewport(BlockViewport bv,
java.util.List children)
AbstractRenderer
renderBlockViewport in class AbstractRendererbv - The block viewportchildren - The children to render within the block viewportAbstractRenderer.renderBlockViewport(BlockViewport, List)
public void renderImage(Image image,
java.awt.geom.Rectangle2D pos)
AbstractRenderer
renderImage in class AbstractRendererimage - The imagepos - The target position of the image
(todo) Make renderImage() protectedAbstractRenderer.renderImage(Image, Rectangle2D)
protected 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
public void renderForeignObject(ForeignObject fo,
java.awt.geom.Rectangle2D pos)
AbstractRenderer
renderForeignObject in class AbstractRendererfo - The foreign object areapos - The target position of the foreign object
(todo) Make renderForeignObject() protectedAbstractRenderer.renderForeignObject(ForeignObject, Rectangle2D)protected void renderInlineAreaBackAndBorders(InlineArea area)
renderInlineAreaBackAndBorders in class AbstractRendererarea - the inline area for which the background, border and padding is to be
rendered
protected void drawBackAndBorders(Area area,
float startx,
float starty,
float width,
float height)
area - the area whose traits are usedstartx - 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 side
protected void drawFastBorders(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 side
protected void drawQualityBorders(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 side
|
fop 0.93 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||