fop 1.0

org.apache.fop.render.intermediate
Class IFUtil

java.lang.Object
  extended by org.apache.fop.render.intermediate.IFUtil

public class IFUtil
extends java.lang.Object

Utility functions for the intermediate format.


Constructor Summary
IFUtil()
           
 
Method Summary
static java.lang.String getEffectiveMIMEType(IFDocumentHandler documentHandler)
          Returns the MIME type of the output format that the given document handler is supposed to handle.
static void setupFonts(IFDocumentHandler documentHandler)
          Sets up the fonts on a document handler.
static void setupFonts(IFDocumentHandler documentHandler, FontInfo fontInfo)
          Sets up the fonts on a document handler.
static java.lang.String toString(java.awt.geom.AffineTransform transform)
          Converts an AffineTransform instance to an SVG style transform method.
static java.lang.String toString(java.awt.geom.AffineTransform[] transforms)
          Converts an AffineTransform array to an SVG style transform method sequence.
static java.lang.StringBuffer toString(java.awt.geom.AffineTransform[] transforms, java.lang.StringBuffer sb)
          Converts an AffineTransform array to an SVG style transform method sequence.
static java.lang.StringBuffer toString(java.awt.geom.AffineTransform transform, java.lang.StringBuffer sb)
          Converts an AffineTransform instance to an SVG style transform method.
static java.lang.String toString(int[] coordinates)
          Converts an array of integer coordinates into a space-separated string.
static java.lang.String toString(java.awt.Rectangle rect)
          Converts a rectangle into a space-separated string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IFUtil

public IFUtil()
Method Detail

toString

public static java.lang.StringBuffer toString(java.awt.geom.AffineTransform transform,
                                              java.lang.StringBuffer sb)
Converts an AffineTransform instance to an SVG style transform method.

Parameters:
transform - the transformation matrix
sb - the StringBuffer to write the transform method to
Returns:
the StringBuffer passed to this method

toString

public static java.lang.StringBuffer toString(java.awt.geom.AffineTransform[] transforms,
                                              java.lang.StringBuffer sb)
Converts an AffineTransform array to an SVG style transform method sequence.

Parameters:
transforms - the transformation matrix array
sb - the StringBuffer to write the transform method sequence to
Returns:
the StringBuffer passed to this method

toString

public static java.lang.String toString(java.awt.geom.AffineTransform[] transforms)
Converts an AffineTransform array to an SVG style transform method sequence.

Parameters:
transforms - the transformation matrix array
Returns:
the formatted array

toString

public static java.lang.String toString(java.awt.geom.AffineTransform transform)
Converts an AffineTransform instance to an SVG style transform method.

Parameters:
transform - the transformation matrix
Returns:
the formatted array

toString

public static java.lang.String toString(int[] coordinates)
Converts an array of integer coordinates into a space-separated string.

Parameters:
coordinates - the coordinates
Returns:
the space-separated array of coordinates

toString

public static java.lang.String toString(java.awt.Rectangle rect)
Converts a rectangle into a space-separated string.

Parameters:
rect - the rectangle
Returns:
the space-separated array of coordinates

setupFonts

public static void setupFonts(IFDocumentHandler documentHandler,
                              FontInfo fontInfo)
                       throws FOPException
Sets up the fonts on a document handler. If the document handler provides a configurator object the configuration from the FopFactory will be used. Otherwise, a default font configuration will be set up.

Parameters:
documentHandler - the document handler
fontInfo - the font info object (may be null)
Throws:
FOPException - if an error occurs while setting up the fonts

setupFonts

public static void setupFonts(IFDocumentHandler documentHandler)
                       throws FOPException
Sets up the fonts on a document handler. If the document handler provides a configurator object the configuration from the FopFactory will be used. Otherwise, a default font configuration will be set up.

Parameters:
documentHandler - the document handler
Throws:
FOPException - if an error occurs while setting up the fonts

getEffectiveMIMEType

public static java.lang.String getEffectiveMIMEType(IFDocumentHandler documentHandler)
Returns the MIME type of the output format that the given document handler is supposed to handle. If the document handler is an IFSerializer it returns the MIME type of the document handler it is mimicking.

Parameters:
documentHandler - the document handler
Returns:
the effective MIME type

fop 1.0

Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.