|
fop 2.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.render.intermediate.IFUtil
public final class IFUtil
Utility functions for the intermediate format.
Method Summary | |
---|---|
static void |
adjustPA(int[] paDst,
int[] paSrc)
Adjust a position adjustments array. |
static int[] |
convertDPToDX(int[][] dp)
Convert the general gpos 'dp' adjustments to the older 'dx' adjustments. |
static int[] |
convertDPToDX(int[][] dp,
int count)
Convert the general gpos 'dp' adjustments to the older 'dx' adjustments. |
static int[][] |
convertDXToDP(int[] dx)
Convert the general gpos 'dp' adjustments to the older 'dx' adjustments. |
static int[][] |
convertDXToDP(int[] dx,
int count)
Convert the general gpos 'dp' adjustments to the older 'dx' adjustments. |
static int[][] |
copyDP(int[][] dp,
int offset,
int count)
Copy entries from position adjustments. |
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 boolean |
isDPIdentity(int[][] dp)
Determine if position adjustments is the identity adjustment, i.e., no non-zero adjustment. |
static boolean |
isDPOnlyDX(int[][] dp)
Determine if position adjustments comprises only DX adjustments as encoded by convertDPToDX(int[][], int) . |
static boolean |
isPAIdentity(int[] pa)
Determine if position adjustment is the identity adjustment, i.e., no non-zero adjustment. |
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 |
Method Detail |
---|
public static java.lang.StringBuffer toString(java.awt.geom.AffineTransform transform, java.lang.StringBuffer sb)
AffineTransform
instance to an SVG style transform method.
transform
- the transformation matrixsb
- the StringBuffer to write the transform method to
public static java.lang.StringBuffer toString(java.awt.geom.AffineTransform[] transforms, java.lang.StringBuffer sb)
AffineTransform
array to an SVG style transform method sequence.
transforms
- the transformation matrix arraysb
- the StringBuffer to write the transform method sequence to
public static java.lang.String toString(java.awt.geom.AffineTransform[] transforms)
AffineTransform
array to an SVG style transform method sequence.
transforms
- the transformation matrix array
public static java.lang.String toString(java.awt.geom.AffineTransform transform)
AffineTransform
instance to an SVG style transform method.
transform
- the transformation matrix
public static java.lang.String toString(int[] coordinates)
coordinates
- the coordinates
public static java.lang.String toString(java.awt.Rectangle rect)
rect
- the rectangle
public static void setupFonts(IFDocumentHandler documentHandler, FontInfo fontInfo) throws FOPException
FopFactory
will be used.
Otherwise, a default font configuration will be set up.
documentHandler
- the document handlerfontInfo
- the font info object (may be null)
FOPException
- if an error occurs while setting up the fontspublic static void setupFonts(IFDocumentHandler documentHandler) throws FOPException
FopFactory
will be used.
Otherwise, a default font configuration will be set up.
documentHandler
- the document handler
FOPException
- if an error occurs while setting up the fontspublic static java.lang.String getEffectiveMIMEType(IFDocumentHandler documentHandler)
IFSerializer
it returns the MIME type of the
document handler it is mimicking.
documentHandler
- the document handler
public static int[] convertDPToDX(int[][] dp, int count)
dp
- an array of 4-tuples, expressing [X,Y] placment
adjustments and [X,Y] advancement adjustments, in that order (may be null)count
- if dp
is not null, then a count of dp values to convert
dp
is not null, then an array of adjustments to the current
x position prior to rendering individual glyphs; otherwise, nullpublic static int[] convertDPToDX(int[][] dp)
dp
- an array of 4-tuples, expressing [X,Y] placment
adjustments and [X,Y] advancement adjustments, in that order (may be null)
dp
is not null, then an array of adjustments to the current
x position prior to rendering individual glyphs; otherwise, nullpublic static int[][] convertDXToDP(int[] dx, int count)
dx
- an array of adjustments to the current x position prior to rendering
individual glyphs or nullcount
- if dx
is not null, then a count of dx values to convert
dx
is not null, then an array of 4-tuples, expressing [X,Y]
placment adjustments and [X,Y] advancement adjustments, in that order; otherwise, nullpublic static int[][] convertDXToDP(int[] dx)
dx
- an array of adjustments to the current x position prior to rendering
individual glyphs or null
dx
is not null, then an array of 4-tuples, expressing [X,Y]
placment adjustments and [X,Y] advancement adjustments, in that order; otherwise, nullpublic static boolean isPAIdentity(int[] pa)
pa
- a 4-tuple, expressing [X,Y] placment and [X,Y] advance adjuustments (may be null)
dp
is null or contains no non-zero adjustmentpublic static boolean isDPIdentity(int[][] dp)
dp
- an array of 4-tuples, expressing [X,Y] placment
adjustments and [X,Y] advancement adjustments, in that order (may be null)
dp
is null or contains no non-zero adjustmentpublic static boolean isDPOnlyDX(int[][] dp)
convertDPToDX(int[][], int)
. Note that if given a set of all all zero position
adjustments, both this method and isDPIdentity(int[][])
will return true;
however, this method may return true when isDPIdentity(int[][])
returns false.
dp
- an array of 4-tuples, expressing [X,Y] placment
adjustments and [X,Y] advancement adjustments, in that order (may be null)
dp
is not null and contains only xPlaAdjust
and xAdvAdjust values consistent with the output of convertDPToDX(int[][], int)
.public static void adjustPA(int[] paDst, int[] paSrc)
paDst
and paSrc
are
non-null, then paSrc[i]
is added to paDst[i]
.
paDst
- a 4-tuple, expressing [X,Y] placment
and [X,Y] advance adjuustments (may be null)paSrc
- a 4-tuple, expressing [X,Y] placment
and [X,Y] advance adjuustments (may be null)public static int[][] copyDP(int[][] dp, int offset, int count)
dp
- an array of 4-tuples, expressing [X,Y] placment
adjustments and [X,Y] advancement adjustments, in that orderoffset
- starting offset from which to copycount
- number of entries to copy
|
fop 2.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |