org.foray.render
Class PrintRenderer

java.lang.Object
  extended by org.foray.output.OutputTarget
      extended by org.foray.render.Renderer
          extended by org.foray.render.PrintRenderer
All Implemented Interfaces:
org.axsl.galley.RenderVisitor, org.axsl.output.OutputTarget, org.axsl.output.Renderer
Direct Known Subclasses:
PCLRenderer, PDFRenderer, PSRenderer, TXTRenderer

public abstract class PrintRenderer
extends Renderer

Abstract base class of "Print" type renderers.


Field Summary
 
Fields inherited from class org.foray.render.Renderer
SHADING_WEIGHT_BLUE, SHADING_WEIGHT_GREEN, SHADING_WEIGHT_RED
 
Constructor Summary
PrintRenderer(org.apache.commons.logging.Log logger)
          Constructor.
 
Method Summary
 int[] getFontSources()
           
abstract  org.axsl.output.DocumentConfiguration getOutputConfiguration()
          Returns the output configuration for this renderer.
protected  int getOverlineYPosition(org.axsl.galley.TextArea area)
          Computes the Y position that should be used for the overline stroke.
protected  int getThroughYPosition(org.axsl.galley.TextArea area)
          Computes the Y position that should be used for the through stroke.
protected  int getUnderlineYPosition(org.axsl.galley.TextArea area)
          Computes the Y position that should be used for the underline stroke.
protected  void markBorder(org.axsl.galley.BorderPaddingArea area)
          Marks the border, if any, for the given area.
 void render(org.axsl.galley.LeaderArea area)
           
 void render(org.axsl.galley.TextArea area)
           
protected  void renderGenericSpace(org.axsl.galley.TextArea area)
          Render a "space", that is, an area that has no text or other content, but that may have features like underscore, overscore, and through-score.
 
Methods inherited from class org.foray.render.Renderer
colorToFloat, convertMillipointRectangle, drawGraphic, drawLine, drawRectangle, getAreaTree, getPixelsPerInch, markBackground, render, render, render, render, render, render, render, render, render, render, render, render, render, render, render, render, render, render, renderChildren, renderDocumentNodes, renderRegions, renderTextSegment, resetTextCursor, setGalley, shadingPercent, toPoints
 
Methods inherited from class org.foray.output.OutputTarget
getApplicationName, getApplicationNameShort, getApplicationVersion, getDeveloperURLShort, getFontConsumer, getLogger, getOutputStream, getStrokeSVGText, outputStreamRequired, setApplicationName, setApplicationNameShort, setApplicationVersion, setDeveloperUrlShort, setFontConsumer, setOutputStream, setStrokeText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.axsl.output.OutputTarget
outputStreamRequired, setApplicationName, setApplicationNameShort, setApplicationVersion, setDeveloperUrlShort, setFontConsumer, setOutputStream, setStrokeText, startOutput, stopOutput
 

Constructor Detail

PrintRenderer

public PrintRenderer(org.apache.commons.logging.Log logger)
Constructor.

Parameters:
logger - The logger.
Method Detail

markBorder

protected void markBorder(org.axsl.galley.BorderPaddingArea area)
                   throws org.axsl.galley.GalleyVisitorException
Description copied from class: Renderer
Marks the border, if any, for the given area.

Specified by:
markBorder in class Renderer
Parameters:
area - The area whose border is to be drawn.
Throws:
org.axsl.galley.GalleyVisitorException - For errors during rendering.

renderGenericSpace

protected void renderGenericSpace(org.axsl.galley.TextArea area)
                           throws org.axsl.galley.GalleyVisitorException
Render a "space", that is, an area that has no text or other content, but that may have features like underscore, overscore, and through-score.

Parameters:
area - The area whose "space" features are to be rendered.
Throws:
org.axsl.galley.GalleyVisitorException - For errors during rendering.

getUnderlineYPosition

protected int getUnderlineYPosition(org.axsl.galley.TextArea area)
Computes the Y position that should be used for the underline stroke.

Parameters:
area - The area whose metrics should be used for the computation.
Returns:
The Y position that should be used for the underline stroke.

getOverlineYPosition

protected int getOverlineYPosition(org.axsl.galley.TextArea area)
Computes the Y position that should be used for the overline stroke.

Parameters:
area - The area whose metrics should be used for the computation.
Returns:
The Y position that should be used for the overline stroke.

getThroughYPosition

protected int getThroughYPosition(org.axsl.galley.TextArea area)
Computes the Y position that should be used for the through stroke.

Parameters:
area - The area whose metrics should be used for the computation.
Returns:
The Y position that should be used for the through stroke.

render

public void render(org.axsl.galley.LeaderArea area)
            throws org.axsl.galley.GalleyVisitorException
Throws:
org.axsl.galley.GalleyVisitorException

render

public void render(org.axsl.galley.TextArea area)
            throws org.axsl.galley.GalleyVisitorException
Throws:
org.axsl.galley.GalleyVisitorException

getFontSources

public int[] getFontSources()

getOutputConfiguration

public abstract org.axsl.output.DocumentConfiguration getOutputConfiguration()
Description copied from class: OutputTarget
Returns the output configuration for this renderer.

Specified by:
getOutputConfiguration in class OutputTarget
Returns:
The output configuration for this renderer.


Copyright © 2017. All rights reserved.