yext.export.io
Class EPSOutputHandler

java.lang.Object
  extended by y.io.IOHandler
      extended by yext.export.io.OutputHandler
          extended by yext.export.io.EPSOutputHandler

public class EPSOutputHandler
extends OutputHandler

Writes a Graph2D in EPS vector graphics format.

The size, viewport and zoom level of the output will be determined by the Graph2DView associated with the input graph.

An EPSOutputHandler is used the same way as any other IOHandler. E.g. the simplest way to export a given Graph2D instance to EPS is:

 try {
   new EPSOutputHandler().write(graph2D, "myGraphAsEPS.eps");
 } catch(IOException ex) {
   // error handling code
 }
 

See Also:
Graph2DView
 

Field Summary
static byte PLAIN_TEXT
          Text handling policy which will result in regular text (i.e. plain text glyphs).
static byte PLAIN_TEXT_WITH_EMBEDDED_FONTS
          Text handling policy which will result in regular text (i.e. plain text glyphs) and fonts used in labeled graph elements being embedded into the resulting PDF output.
static byte VECTORIZED_TEXT
          Text handling policy which will result in text being rendered as vectorized shapes instead of plain text glyphs.
 
Constructor Summary
EPSOutputHandler()
          Creates a new instance of EPSOutputHandler
 
Method Summary
 String getFileNameExtension()
          Returns "eps", the standard file name extension for Encapsulated PostScript.
 byte getTextRenderingPolicy()
          Returns the text handling policy used by this output handler.
 void setTextRenderingPolicy(byte textRenderingPolicy)
          Specifies the text handling policy to be used by this output handler.
 
Methods inherited from class yext.export.io.OutputHandler
addRenderingHint, canRead, canWrite, createDefaultGraph2DView, createGraphicsContext, getCreator, getFileFormatString, read, removeRenderingHint, setCreator, write
 
Methods inherited from class y.io.IOHandler
canWriteSubset, createObjectInputStream, createObjectOutputStream, hide, read, read, shouldSerialize, shouldSerialize, write, writeSubset, writeSubset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PLAIN_TEXT

public static final byte PLAIN_TEXT
Text handling policy which will result in regular text (i.e. plain text glyphs).

See Also:
setTextRenderingPolicy(byte), PLAIN_TEXT_WITH_EMBEDDED_FONTS, VECTORIZED_TEXT, Constant Field Values

PLAIN_TEXT_WITH_EMBEDDED_FONTS

public static final byte PLAIN_TEXT_WITH_EMBEDDED_FONTS
Text handling policy which will result in regular text (i.e. plain text glyphs) and fonts used in labeled graph elements being embedded into the resulting PDF output.

Although font embedding ensures that the original graph element's label font can be used when displaying or printing PDF on a platform where that font is not normally available, it is not always advisable to embed fonts, e.g. when the size of the generated PDF needs to be kept as small as possible or when a font's license terms prohibit embedding.

See Also:
setTextRenderingPolicy(byte), PLAIN_TEXT, VECTORIZED_TEXT, Constant Field Values

VECTORIZED_TEXT

public static final byte VECTORIZED_TEXT
Text handling policy which will result in text being rendered as vectorized shapes instead of plain text glyphs.

Rendering text as vectorized shapes will result in smoothly scalable vector graphics and prevent the need for font embedding at the expense of generating output that is no PDF text and therefore cannot be selected as such.

See Also:
setTextRenderingPolicy(byte), PLAIN_TEXT, PLAIN_TEXT_WITH_EMBEDDED_FONTS, Constant Field Values
Constructor Detail

EPSOutputHandler

public EPSOutputHandler()
Creates a new instance of EPSOutputHandler

Method Detail

getFileNameExtension

public String getFileNameExtension()
Returns "eps", the standard file name extension for Encapsulated PostScript.

Specified by:
getFileNameExtension in class IOHandler

getTextRenderingPolicy

public byte getTextRenderingPolicy()
Returns the text handling policy used by this output handler.

Returns:
the text handling policy used by this output handler.
See Also:
PLAIN_TEXT, PLAIN_TEXT_WITH_EMBEDDED_FONTS, VECTORIZED_TEXT

setTextRenderingPolicy

public void setTextRenderingPolicy(byte textRenderingPolicy)
Specifies the text handling policy to be used by this output handler.

Default to VECTORIZED_TEXT.

Parameters:
textRenderingPolicy - one of


© Copyright 2007-2015,
yWorks GmbH.
All rights reserved.