|
fop 1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.render.pdf.CTMHelper
public final class CTMHelper
CTMHelper converts FOP transformation matrices to those suitable for use by the PDFRenderer. The e and f elements of the matrix will be divided by 1000 as FOP uses millipoints as it's default user space and PDF uses points.
CTM
Constructor Summary | |
---|---|
CTMHelper()
|
Method Summary | |
---|---|
static double[] |
toPDFArray(CTM sourceMatrix)
Creates an array of six doubles from the source CTM. |
static CTM |
toPDFCTM(CTM sourceMatrix)
Creates a new CTM based in the sourceMatrix. |
static java.lang.String |
toPDFString(java.awt.geom.AffineTransform transform,
boolean convertMillipoints)
Converts the AffineTransform instance to a string for use in the PDFRenderer cm operations. |
static java.lang.String |
toPDFString(CTM sourceMatrix)
Converts the sourceMatrix to a string for use in the PDFRenderer cm operations. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CTMHelper()
Method Detail |
---|
public static java.lang.String toPDFString(CTM sourceMatrix)
Converts the sourceMatrix to a string for use in the PDFRenderer cm operations.
For example:
org.apache.fop.area.CTM ctm = new org.apache.fop.area.CTM(1.0, 0.0, 0.0, 1.0, 1000.0, 1000.0); String pdfMatrix = org.apache.fop.render.pdf.CTMHelper.toPDFString(ctm);will return the string "
1.0 0.0 0.0 1.0 1.0 1.0
".
sourceMatrix
- - The matrix to convert.
public static java.lang.String toPDFString(java.awt.geom.AffineTransform transform, boolean convertMillipoints)
Converts the AffineTransform instance to a string for use in the PDFRenderer cm operations.
transform
- The matrix to convert.convertMillipoints
- Indicates that the matrix needs to be converted from millipoints
to points.
public static CTM toPDFCTM(CTM sourceMatrix)
Creates a new CTM based in the sourceMatrix.
For example:
org.apache.fop.area.CTM inCTM = new org.apache.fop.area.CTM(1.0, 0.0, 0.0, 1.0, 1000.0, 1000.0); org.apache.fop.area.CTM outCTM = org.apache.fop.render.pdf.CTMHelper.toPDFCTM(ctm);will return a new CTM where a == 1.0, b == 0.0, c == 0.0, d == 1.0, e == 1.0 and f == 1.0.
sourceMatrix
- - The matrix to convert.
public static double[] toPDFArray(CTM sourceMatrix)
Creates an array of six doubles from the source CTM.
For example:
org.apache.fop.area.CTM inCTM = new org.apache.fop.area.CTM(1.0, 0.0, 0.0, 1.0, 1000.0, 1000.0); double matrix[] = org.apache.fop.render.pdf.CTMHelper.toPDFArray(ctm);will return a new array where matrix[0] == 1.0, matrix[1] == 0.0, matrix[2] == 0.0, matrix[3] == 1.0, matrix[4] == 1.0 and matrix[5] == 1.0.
sourceMatrix
- - The matrix to convert.
|
fop 1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |