You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2008/03/06 14:34:59 UTC
svn commit: r634267 [17/39] - in
/xmlgraphics/fop/branches/Temp_ProcessingFeedback: ./ examples/embedding/
examples/embedding/java/embedding/
examples/embedding/java/embedding/intermediate/ examples/embedding/xml/xml/
examples/fo/ examples/fo/advanced/...
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/svg/PDFGraphics2D.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/svg/PDFGraphics2D.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/svg/PDFGraphics2D.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/svg/PDFGraphics2D.java Thu Mar 6 05:33:44 2008
@@ -41,7 +41,6 @@
import java.awt.image.BufferedImage;
import java.awt.image.ColorModel;
import java.awt.image.DataBuffer;
-import java.awt.image.DataBufferInt;
import java.awt.image.DirectColorModel;
import java.awt.image.ImageObserver;
import java.awt.image.Raster;
@@ -63,7 +62,11 @@
import org.apache.batik.gvt.GraphicsNode;
import org.apache.batik.gvt.PatternPaint;
+import org.apache.xmlgraphics.image.loader.ImageInfo;
+import org.apache.xmlgraphics.image.loader.ImageSize;
+import org.apache.xmlgraphics.image.loader.impl.ImageRawCCITTFax;
import org.apache.xmlgraphics.image.loader.impl.ImageRawJPEG;
+import org.apache.xmlgraphics.image.loader.impl.ImageRendered;
import org.apache.xmlgraphics.java2d.AbstractGraphics2D;
import org.apache.xmlgraphics.java2d.GraphicContext;
@@ -83,7 +86,6 @@
import org.apache.fop.pdf.PDFImage;
import org.apache.fop.pdf.PDFImageXObject;
import org.apache.fop.pdf.PDFLink;
-import org.apache.fop.pdf.PDFName;
import org.apache.fop.pdf.PDFNumber;
import org.apache.fop.pdf.PDFPattern;
import org.apache.fop.pdf.PDFResourceContext;
@@ -91,7 +93,9 @@
import org.apache.fop.pdf.PDFState;
import org.apache.fop.pdf.PDFText;
import org.apache.fop.pdf.PDFXObject;
+import org.apache.fop.render.pdf.ImageRawCCITTFaxAdapter;
import org.apache.fop.render.pdf.ImageRawJPEGAdapter;
+import org.apache.fop.render.pdf.ImageRenderedAdapter;
import org.apache.fop.util.ColorExt;
/**
@@ -139,10 +143,10 @@
protected int baseLevel = 0;
/**
- * The count of JPEG images added to document so they recieve
+ * The count of natively handled images added to document so they receive
* unique keys.
*/
- protected int[] jpegCount = {0};
+ protected int nativeCount = 0;
/**
* The current font information.
@@ -228,7 +232,7 @@
this.pageRef = g.pageRef;
this.graphicsState = g.graphicsState;
this.currentStream = g.currentStream;
- this.jpegCount = g.jpegCount;
+ this.nativeCount = g.nativeCount;
this.outputStream = g.outputStream;
this.ovFontState = g.ovFontState;
}
@@ -347,6 +351,14 @@
+ PDFNumber.doubleOut(matrix[5], DEC) + " cm\n");
}
+ private void concatMatrix(AffineTransform transform) {
+ if (!transform.isIdentity()) {
+ double[] matrix = new double[6];
+ transform.getMatrix(matrix);
+ concatMatrix(matrix);
+ }
+ }
+
/**
* This is mainly used for shading patterns which use the document-global coordinate system
* instead of the local one.
@@ -389,44 +401,41 @@
}
/**
- * Add a JPEG image directly to the PDF document.
- * This is used by the PDFImageElementBridge to draw a JPEG
- * directly into the pdf document rather than converting the image into
+ * Add a natively handled image directly to the PDF document.
+ * This is used by the PDFImageElementBridge to draw a natively handled image
+ * (like JPEG or CCITT images)
+ * directly into the PDF document rather than converting the image into
* a bitmap and increasing the size.
*
- * @param jpeg the jpeg image to draw
+ * @param image the image to draw
* @param x the x position
* @param y the y position
* @param width the width to draw the image
* @param height the height to draw the image
*/
- public void addJpegImage(ImageRawJPEG jpeg, float x, float y,
+ void addNativeImage(org.apache.xmlgraphics.image.loader.Image image, float x, float y,
float width, float height) {
preparePainting();
- // Need to include hash code as when invoked from FO you
- // may have several 'independent' PDFGraphics2D so the
- // count is not enough.
- String key = "__AddJPEG_" + hashCode() + "_" + jpegCount[0];
- jpegCount[0]++;
- PDFImage pdfimage = new ImageRawJPEGAdapter(jpeg, key);
- PDFName imageName = this.pdfDoc.addImage(resourceContext,
- pdfimage).getName();
- AffineTransform at = getTransform();
- double[] matrix = new double[6];
- at.getMatrix(matrix);
- currentStream.write("q\n");
- if (!at.isIdentity()) {
- concatMatrix(matrix);
+ String key = image.getInfo().getOriginalURI();
+ if (key == null) {
+ // Need to include hash code as when invoked from FO you
+ // may have several 'independent' PDFGraphics2D so the
+ // count is not enough.
+ key = "__AddNative_" + hashCode() + "_" + nativeCount;
+ nativeCount++;
}
- Shape imclip = getClip();
- writeClip(imclip);
-
- currentStream.write("" + width + " 0 0 "
- + (-height) + " "
- + x + " "
- + (y + height) + " cm\n"
- + imageName + " Do\nQ\n");
-
+
+ PDFImage pdfImage;
+ if (image instanceof ImageRawJPEG) {
+ pdfImage = new ImageRawJPEGAdapter((ImageRawJPEG)image, key);
+ } else if (image instanceof ImageRawCCITTFax) {
+ pdfImage = new ImageRawCCITTFaxAdapter((ImageRawCCITTFax)image, key);
+ } else {
+ throw new IllegalArgumentException(
+ "Unsupported Image subclass: " + image.getClass().getName());
+ }
+
+ PDFXObject xObject = this.pdfDoc.addImage(resourceContext, pdfImage);
if (outputStream != null) {
try {
this.pdfDoc.output(outputStream);
@@ -434,6 +443,10 @@
// ignore exception, will be thrown again later
}
}
+
+ AffineTransform at = new AffineTransform();
+ at.translate(x, y);
+ useXObject(xObject, at, width, height);
}
/**
@@ -480,40 +493,7 @@
BufferedImage.TYPE_INT_ARGB);
}
- /**
- * Draws as much of the specified image as has already been scaled
- * to fit inside the specified rectangle.
- * <p>
- * The image is drawn inside the specified rectangle of this
- * graphics context's coordinate space, and is scaled if
- * necessary. Transparent pixels do not affect whatever pixels
- * are already there.
- * <p>
- * This method returns immediately in all cases, even if the
- * entire image has not yet been scaled, dithered, and converted
- * for the current output device.
- * If the current output representation is not yet complete, then
- * <code>drawImage</code> returns <code>false</code>. As more of
- * the image becomes available, the process that draws the image notifies
- * the image observer by calling its <code>imageUpdate</code> method.
- * <p>
- * A scaled version of an image will not necessarily be
- * available immediately just because an unscaled version of the
- * image has been constructed for this output device. Each size of
- * the image may be cached separately and generated from the original
- * data in a separate image production sequence.
- * @param img the specified image to be drawn.
- * @param x the <i>x</i> coordinate.
- * @param y the <i>y</i> coordinate.
- * @param width the width of the rectangle.
- * @param height the height of the rectangle.
- * @param observer object to be notified as more of
- * the image is converted.
- * @return true if the image was drawn
- * @see java.awt.Image
- * @see java.awt.image.ImageObserver
- * @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int)
- */
+ /** {@inheritDoc} */
public boolean drawImage(Image img, int x, int y, int width, int height,
ImageObserver observer) {
preparePainting();
@@ -521,8 +501,9 @@
// the pdf document. If so, we just reuse the reference;
// otherwise we have to build a FopImage and add it to the pdf
// document
- PDFXObject imageInfo = pdfDoc.getXObject("TempImage:" + img.toString());
- if (imageInfo == null) {
+ String key = "TempImage:" + img.toString();
+ PDFXObject xObject = pdfDoc.getXObject(key);
+ if (xObject == null) {
// OK, have to build and add a PDF image
Dimension size = new Dimension(width, height);
@@ -541,92 +522,14 @@
}
g.dispose();
- final byte[] result = new byte[buf.getWidth() * buf.getHeight() * 3 /*for RGB*/];
- byte[] mask = new byte[buf.getWidth() * buf.getHeight()];
- boolean hasMask = false;
- //boolean binaryMask = true;
-
- Raster raster = buf.getData();
- DataBuffer bd = raster.getDataBuffer();
-
- int count = 0;
- int maskpos = 0;
- int[] iarray;
- int i, j, val, alpha;
- switch (bd.getDataType()) {
- case DataBuffer.TYPE_INT:
- int[][] idata = ((DataBufferInt)bd).getBankData();
- for (i = 0; i < idata.length; i++) {
- iarray = idata[i];
- for (j = 0; j < iarray.length; j++) {
- val = iarray[j];
- alpha = val >>> 24;
- mask[maskpos++] = (byte)(alpha & 0xFF);
- if (alpha != 255) {
- hasMask = true;
- }
- result[count++] = (byte)((val >> 16) & 0xFF);
- result[count++] = (byte)((val >> 8) & 0xFF);
- result[count++] = (byte)((val) & 0xFF);
- }
- }
- break;
- default:
- // error
- break;
- }
- String ref = null;
- if (hasMask) {
- // if the mask is binary then we could convert it into a bitmask
- BitmapImage fopimg = new BitmapImage("TempImageMask:"
- + img.toString(), buf.getWidth(),
- buf.getHeight(), mask, null);
- fopimg.setColorSpace(new PDFDeviceColorSpace(PDFDeviceColorSpace.DEVICE_GRAY));
- PDFImageXObject xobj = pdfDoc.addImage(resourceContext, fopimg);
- ref = xobj.referencePDF();
-
- if (outputStream != null) {
- try {
- this.pdfDoc.output(outputStream);
- } catch (IOException ioe) {
- // ignore exception, will be thrown again later
- }
- }
- } else {
- mask = null;
- }
-
- BitmapImage fopimg = new BitmapImage("TempImage:"
- + img.toString(), buf.getWidth(),
- buf.getHeight(), result, ref);
- imageInfo = pdfDoc.addImage(resourceContext, fopimg);
- //int xObjectNum = imageInfo.getXNumber();
-
- if (outputStream != null) {
- try {
- this.pdfDoc.output(outputStream);
- } catch (IOException ioe) {
- // ignore exception, will be thrown again later
- }
- }
+ xObject = addRenderedImage(key, buf);
} else {
- resourceContext.getPDFResources().addXObject(imageInfo);
+ resourceContext.getPDFResources().addXObject(xObject);
}
- // now do any transformation required and add the actual image
- // placement instance
- AffineTransform at = getTransform();
- double[] matrix = new double[6];
- at.getMatrix(matrix);
- currentStream.write("q\n");
- if (!at.isIdentity()) {
- concatMatrix(matrix);
- }
- Shape imclip = getClip();
- writeClip(imclip);
- currentStream.write("" + width + " 0 0 " + (-height) + " " + x
- + " " + (y + height) + " cm\n"
- + imageInfo.getName() + " Do\nQ\n");
+ AffineTransform at = new AffineTransform();
+ at.translate(x, y);
+ useXObject(xObject, at, width, height);
return true;
}
@@ -1328,63 +1231,61 @@
}
}
- /**
- * Renders a {@link RenderedImage},
- * applying a transform from image
- * space into user space before drawing.
- * The transformation from user space into device space is done with
- * the current <code>Transform</code> in the <code>Graphics2D</code>.
- * The specified transformation is applied to the image before the
- * transform attribute in the <code>Graphics2D</code> context is applied.
- * The rendering attributes applied include the <code>Clip</code>,
- * <code>Transform</code>, and <code>Composite</code> attributes. Note
- * that no rendering is done if the specified transform is
- * noninvertible.
- * @param img the image to be rendered
- * @param xform the transformation from image space into user space
- * @see #transform
- * @see #setTransform
- * @see #setComposite
- * @see #clip
- * @see #setClip
- */
+ /** {@inheritDoc} */
public void drawRenderedImage(RenderedImage img, AffineTransform xform) {
- //NYI
+ String key = "TempImage:" + img.toString();
+ drawInnerRenderedImage(key, img, xform);
}
- /**
- * Renders a
- * {@link RenderableImage},
- * applying a transform from image space into user space before drawing.
- * The transformation from user space into device space is done with
- * the current <code>Transform</code> in the <code>Graphics2D</code>.
- * The specified transformation is applied to the image before the
- * transform attribute in the <code>Graphics2D</code> context is applied.
- * The rendering attributes applied include the <code>Clip</code>,
- * <code>Transform</code>, and <code>Composite</code> attributes. Note
- * that no rendering is done if the specified transform is
- * noninvertible.
- * <p>
- * Rendering hints set on the <code>Graphics2D</code> object might
- * be used in rendering the <code>RenderableImage</code>.
- * If explicit control is required over specific hints recognized by a
- * specific <code>RenderableImage</code>, or if knowledge of which hints
- * are used is required, then a <code>RenderedImage</code> should be
- * obtained directly from the <code>RenderableImage</code>
- * and rendered using
- * {@link #drawRenderedImage(RenderedImage, AffineTransform) drawRenderedImage}.
- * @param img the image to be rendered
- * @param xform the transformation from image space into user space
- * @see #transform
- * @see #setTransform
- * @see #setComposite
- * @see #clip
- * @see #setClip
- * @see #drawRenderedImage
- */
+ /** {@inheritDoc} */
+ public void drawInnerRenderedImage(String key, RenderedImage img, AffineTransform xform) {
+ preparePainting();
+ PDFXObject xObject = pdfDoc.getXObject(key);
+ if (xObject == null) {
+ xObject = addRenderedImage(key, img);
+ } else {
+ resourceContext.getPDFResources().addXObject(xObject);
+ }
+
+ useXObject(xObject, xform, img.getWidth(), img.getHeight());
+ }
+
+ private void useXObject(PDFXObject xObject, AffineTransform xform, float width, float height) {
+ // now do any transformation required and add the actual image
+ // placement instance
+ currentStream.write("q\n");
+ concatMatrix(getTransform());
+ Shape imclip = getClip();
+ writeClip(imclip);
+ concatMatrix(xform);
+ String w = PDFNumber.doubleOut(width, DEC);
+ String h = PDFNumber.doubleOut(height, DEC);
+ currentStream.write("" + w + " 0 0 -" + h + " 0 " + h + " cm\n"
+ + xObject.getName() + " Do\nQ\n");
+ }
+
+ private PDFXObject addRenderedImage(String key, RenderedImage img) {
+ ImageInfo info = new ImageInfo(null, "image/unknown");
+ ImageSize size = new ImageSize(img.getWidth(), img.getHeight(), 72);
+ info.setSize(size);
+ ImageRendered imgRend = new ImageRendered(info, img, null);
+ ImageRenderedAdapter adapter = new ImageRenderedAdapter(imgRend, key);
+ PDFXObject xObject = pdfDoc.addImage(resourceContext, adapter);
+ if (outputStream != null) {
+ try {
+ this.pdfDoc.output(outputStream);
+ } catch (IOException ioe) {
+ // ignore exception, will be thrown again later
+ }
+ }
+ return xObject;
+ }
+
+ /** {@inheritDoc} */
public void drawRenderableImage(RenderableImage img,
AffineTransform xform) {
- //NYI
+ //TODO Check if this is good enough
+ drawRenderedImage(img.createDefaultRendering(), xform);
}
/**
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/svg/PDFGraphicsConfiguration.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/svg/PDFImageElementBridge.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/svg/PDFImageElementBridge.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/svg/PDFImageElementBridge.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/svg/PDFImageElementBridge.java Thu Mar 6 05:33:44 2008
@@ -39,6 +39,7 @@
import org.apache.xmlgraphics.image.loader.ImageManager;
import org.apache.xmlgraphics.image.loader.ImageSessionContext;
import org.apache.xmlgraphics.image.loader.impl.ImageGraphics2D;
+import org.apache.xmlgraphics.image.loader.impl.ImageRawCCITTFax;
import org.apache.xmlgraphics.image.loader.impl.ImageRawJPEG;
import org.apache.xmlgraphics.image.loader.impl.ImageXMLDOM;
@@ -56,6 +57,7 @@
private final ImageFlavor[] supportedFlavors = new ImageFlavor[]
{ImageFlavor.RAW_JPEG,
+ ImageFlavor.RAW_CCITTFAX,
ImageFlavor.GRAPHICS2D,
ImageFlavor.XML_DOM};
/**
@@ -77,6 +79,8 @@
ImageInfo info = manager.getImageInfo(purl.toString(), sessionContext);
Image image = manager.getImage(info, supportedFlavors, sessionContext);
+ //TODO color profile overrides aren't handled, yet!
+ //ICCColorSpaceExt colorspaceOverride = extractColorSpace(e, ctx);
AbstractGraphicsNode specializedNode = null;
if (image instanceof ImageXMLDOM) {
ImageXMLDOM xmlImage = (ImageXMLDOM)image;
@@ -90,9 +94,9 @@
}
}
if (image instanceof ImageRawJPEG) {
- ImageRawJPEG jpegImage = (ImageRawJPEG)image;
- specializedNode = new PDFJpegNode(jpegImage, ctx, imageElement, purl);
-
+ specializedNode = new LoaderImageNode(image, ctx, imageElement, purl);
+ } else if (image instanceof ImageRawCCITTFax) {
+ specializedNode = new LoaderImageNode(image, ctx, imageElement, purl);
} else if (image instanceof ImageGraphics2D) {
ImageGraphics2D g2dImage = (ImageGraphics2D)image;
specializedNode = new Graphics2DNode(g2dImage);
@@ -135,29 +139,29 @@
/**
- * A PDF jpeg node.
- * This holds a jpeg image so that it can be drawn into
+ * An image node for natively handled Image instance.
+ * This holds a natively handled image so that it can be drawn into
* the PDFGraphics2D.
*/
- public class PDFJpegNode extends AbstractGraphicsNode {
+ public class LoaderImageNode extends AbstractGraphicsNode {
- private ImageRawJPEG jpeg;
+ private Image image;
private BridgeContext ctx;
private Element imageElement;
private ParsedURL purl;
private GraphicsNode origGraphicsNode = null;
/**
- * Create a new PDF JPEG node for drawing JPEG images
- * into pdf graphics.
- * @param j the JPEG image
+ * Create a new image node for drawing natively handled images
+ * into PDF graphics.
+ * @param image the JPEG image
* @param ctx the bridge context
* @param imageElement the SVG image element
* @param purl the URL to the image
*/
- public PDFJpegNode(ImageRawJPEG j, BridgeContext ctx,
+ public LoaderImageNode(Image image, BridgeContext ctx,
Element imageElement, ParsedURL purl) {
- this.jpeg = j;
+ this.image = image;
this.ctx = ctx;
this.imageElement = imageElement;
this.purl = purl;
@@ -175,9 +179,9 @@
float x = 0;
float y = 0;
try {
- float width = jpeg.getSize().getWidthPx();
- float height = jpeg.getSize().getHeightPx();
- pdfg.addJpegImage(jpeg, x, y, width, height);
+ float width = image.getSize().getWidthPx();
+ float height = image.getSize().getHeightPx();
+ pdfg.addNativeImage(image, x, y, width, height);
} catch (Exception e) {
ctx.getUserAgent().displayError(e);
}
@@ -203,8 +207,8 @@
/** {@inheritDoc} */
public Rectangle2D getPrimitiveBounds() {
return new Rectangle2D.Double(0, 0,
- jpeg.getSize().getWidthPx(),
- jpeg.getSize().getHeightPx());
+ image.getSize().getWidthPx(),
+ image.getSize().getHeightPx());
}
/** {@inheritDoc} */
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/tools/anttasks/FileCompare.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/traits/MinOptMax.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/CharUtilities.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/CharUtilities.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/CharUtilities.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/CharUtilities.java Thu Mar 6 05:33:44 2008
@@ -68,7 +68,10 @@
public static final char ZERO_WIDTH_NOBREAK_SPACE = '\uFEFF';
/** soft hyphen */
public static final char SOFT_HYPHEN = '\u00AD';
-
+ /** missing ideograph */
+ public static final char MISSING_IDEOGRAPH = '\u25A1';
+ /** Unicode value indicating the the character is "not a character". */
+ public static final char NOT_A_CHARACTER = '\uFFFF';
/**
* Utility class: Constructor prevents instantiating when subclassed.
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/CharUtilities.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/ColorExt.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/ColorProfileUtil.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/ColorSpaceCache.java
------------------------------------------------------------------------------
svn:keywords = Id
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/ColorUtil.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/ColorUtil.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/ColorUtil.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/ColorUtil.java Thu Mar 6 05:33:44 2008
@@ -22,13 +22,11 @@
import java.awt.Color;
import java.awt.color.ColorSpace;
import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
import java.util.Map;
-import java.util.StringTokenizer;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.fo.expr.PropertyException;
@@ -76,8 +74,8 @@
* <li>system-color(colorname)</li>
* <li>transparent</li>
* <li>colorname</li>
- * <li>fop-rgb-icc</li>
- * <li>cmyk</li>
+ * <li>fop-rgb-icc(r,g,b,cs,cs-src,[num]+) (r/g/b: 0..1, num: 0..1)</li>
+ * <li>cmyk(c,m,y,k) (0..1)</li>
* </ul>
*
* @param foUserAgent FOUserAgent object
@@ -167,30 +165,28 @@
try {
if (poss != -1 && pose != -1) {
value = value.substring(poss + 1, pose);
- StringTokenizer st = new StringTokenizer(value, ",");
- if (st.hasMoreTokens()) {
- String str = st.nextToken().trim();
- red = Float.parseFloat(str.substring(2)) / 255f;
- }
- if (st.hasMoreTokens()) {
- String str = st.nextToken().trim();
- green = Float.parseFloat(str.substring(2)) / 255f;
- }
- if (st.hasMoreTokens()) {
- String str = st.nextToken().trim();
- blue = Float.parseFloat(str.substring(2)) / 255f;
- } else {
- throw new NumberFormatException();
+ String[] args = value.split(",");
+ if (args.length != 3) {
+ throw new PropertyException(
+ "Invalid number of arguments for a java.awt.Color: " + value);
}
- if ((red < 0.0 || red > 1.0) || (green < 0.0 || green > 1.0)
+
+ red = Float.parseFloat(args[0].trim().substring(2)) / 255f;
+ green = Float.parseFloat(args[1].trim().substring(2)) / 255f;
+ blue = Float.parseFloat(args[2].trim().substring(2)) / 255f;
+ if ((red < 0.0 || red > 1.0)
+ || (green < 0.0 || green > 1.0)
|| (blue < 0.0 || blue > 1.0)) {
throw new PropertyException("Color values out of range");
}
} else {
- throw new NullPointerException();
+ throw new IllegalArgumentException(
+ "Invalid format for a java.awt.Color: " + value);
}
+ } catch (PropertyException pe) {
+ throw pe;
} catch (Exception e) {
- throw new PropertyException("Unknown color format: " + value);
+ throw new PropertyException(e);
}
return new Color(red, green, blue);
}
@@ -210,44 +206,46 @@
int pose = value.indexOf(")");
if (poss != -1 && pose != -1) {
value = value.substring(poss + 1, pose);
- StringTokenizer st = new StringTokenizer(value, ",");
try {
+ String[] args = value.split(",");
+ if (args.length != 3) {
+ throw new PropertyException(
+ "Invalid number of arguments: rgb(" + value + ")");
+ }
float red = 0.0f, green = 0.0f, blue = 0.0f;
- if (st.hasMoreTokens()) {
- String str = st.nextToken().trim();
- if (str.endsWith("%")) {
- red = Float.parseFloat(str.substring(0,
- str.length() - 1)) / 100.0f;
- } else {
- red = Float.parseFloat(str) / 255f;
- }
- }
- if (st.hasMoreTokens()) {
- String str = st.nextToken().trim();
- if (str.endsWith("%")) {
- green = Float.parseFloat(str.substring(0,
- str.length() - 1)) / 100.0f;
- } else {
- green = Float.parseFloat(str) / 255f;
- }
- }
- if (st.hasMoreTokens()) {
- String str = st.nextToken().trim();
- if (str.endsWith("%")) {
- blue = Float.parseFloat(str.substring(0,
- str.length() - 1)) / 100.0f;
- } else {
- blue = Float.parseFloat(str) / 255f;
- }
+ String str = args[0].trim();
+ if (str.endsWith("%")) {
+ red = Float.parseFloat(str.substring(0,
+ str.length() - 1)) / 100f;
+ } else {
+ red = Float.parseFloat(str) / 255f;
}
- if ((red < 0.0 || red > 1.0) || (green < 0.0 || green > 1.0)
+ str = args[1].trim();
+ if (str.endsWith("%")) {
+ green = Float.parseFloat(str.substring(0,
+ str.length() - 1)) / 100f;
+ } else {
+ green = Float.parseFloat(str) / 255f;
+ }
+ str = args[2].trim();
+ if (str.endsWith("%")) {
+ blue = Float.parseFloat(str.substring(0,
+ str.length() - 1)) / 100f;
+ } else {
+ blue = Float.parseFloat(str) / 255f;
+ }
+ if ((red < 0.0 || red > 1.0)
+ || (green < 0.0 || green > 1.0)
|| (blue < 0.0 || blue > 1.0)) {
throw new PropertyException("Color values out of range");
}
parsedColor = new Color(red, green, blue);
+ } catch (PropertyException pe) {
+ //simply re-throw
+ throw pe;
} catch (Exception e) {
- throw new PropertyException(
- "Arguments to rgb() must be [0..255] or [0%..100%]");
+ //wrap in a PropertyException
+ throw new PropertyException(e);
}
} else {
throw new PropertyException("Unknown color format: " + value
@@ -269,29 +267,28 @@
Color parsedColor = null;
try {
int len = value.length();
- if ((len >= 4) && (len <= 5)) {
- // note: divide by 15 so F = FF = 1 and so on
- float red = Integer.parseInt(value.substring(1, 2), 16) / 15f;
- float green = Integer.parseInt(value.substring(2, 3), 16) / 15f;
- float blue = Integer.parseInt(value.substring(3, 4), 16) / 15f;
- float alpha = 1.0f;
- if (len == 5) {
- alpha = Integer.parseInt(value.substring(4), 16) / 15f;
- }
- parsedColor = new Color(red, green, blue, alpha);
+ int alpha;
+ if (len == 5 || len == 9) {
+ alpha = Integer.parseInt(
+ value.substring((len == 5) ? 3 : 7), 16);
+ } else {
+ alpha = 0xFF;
+ }
+ int red = 0, green = 0, blue = 0;
+ if ((len == 4) || (len == 5)) {
+ //multiply by 0x11 = 17 = 255/15
+ red = Integer.parseInt(value.substring(1, 2), 16) * 0x11;
+ green = Integer.parseInt(value.substring(2, 3), 16) * 0x11;
+ blue = Integer.parseInt(value.substring(3, 4), 16) * 0X11;
} else if ((len == 7) || (len == 9)) {
- int red = Integer.parseInt(value.substring(1, 3), 16);
- int green = Integer.parseInt(value.substring(3, 5), 16);
- int blue = Integer.parseInt(value.substring(5, 7), 16);
- int alpha = 255;
- if (len == 9) {
- alpha = Integer.parseInt(value.substring(7), 16);
- }
- parsedColor = new Color(red, green, blue, alpha);
+ red = Integer.parseInt(value.substring(1, 3), 16);
+ green = Integer.parseInt(value.substring(3, 5), 16);
+ blue = Integer.parseInt(value.substring(5, 7), 16);
} else {
throw new NumberFormatException();
}
- } catch (NumberFormatException e) {
+ parsedColor = new Color(red, green, blue, alpha);
+ } catch (Exception e) {
throw new PropertyException("Unknown color format: " + value
+ ". Must be #RGB. #RGBA, #RRGGBB, or #RRGGBBAA");
}
@@ -311,61 +308,50 @@
int poss = value.indexOf("(");
int pose = value.indexOf(")");
if (poss != -1 && pose != -1) {
- value = value.substring(poss + 1, pose);
- StringTokenizer st = new StringTokenizer(value, ",");
+ String[] args = value.substring(poss + 1, pose).split(",");
+
try {
- float red = 0.0f, green = 0.0f, blue = 0.0f;
- if (st.hasMoreTokens()) {
- String str = st.nextToken().trim();
- red = Float.parseFloat(str);
- }
- if (st.hasMoreTokens()) {
- String str = st.nextToken().trim();
- green = Float.parseFloat(str);
- }
- if (st.hasMoreTokens()) {
- String str = st.nextToken().trim();
- blue = Float.parseFloat(str);
+ if (args.length < 5) {
+ throw new PropertyException("Too few arguments for rgb-icc() function");
}
- /* Verify rgb replacement arguments */
- if ((red < 0.0 || red > 1.0)
- || (green < 0.0 || green > 1.0)
- || (blue < 0.0 || blue > 1.0)) {
- throw new PropertyException("Color values out of range");
- }
/* Get and verify ICC profile name */
- String iccProfileName = null;
- if (st.hasMoreTokens()) {
- iccProfileName = st.nextToken().trim();
- }
- if (iccProfileName == null || iccProfileName.length() == 0) {
+ String iccProfileName = args[3].trim();
+ if (iccProfileName == null || "".equals(iccProfileName)) {
throw new PropertyException("ICC profile name missing");
}
/* Get and verify ICC profile source */
- String iccProfileSrc = null;
- if (st.hasMoreTokens()) {
- iccProfileSrc = st.nextToken().trim();
- // Strip quotes
- iccProfileSrc = iccProfileSrc.substring(1, iccProfileSrc.length() - 1);
- }
- if (iccProfileSrc == null || iccProfileSrc.length() == 0) {
+ String iccProfileSrc = args[4].trim();
+ if (iccProfileSrc == null || "".equals(iccProfileSrc)) {
throw new PropertyException("ICC profile source missing");
}
+ if (iccProfileSrc.startsWith("\"") || iccProfileSrc.startsWith("'")) {
+ iccProfileSrc = iccProfileSrc.substring(1);
+ }
+ if (iccProfileSrc.endsWith("\"") || iccProfileSrc.endsWith("'")) {
+ iccProfileSrc = iccProfileSrc.substring(0, iccProfileSrc.length() - 1);
+ }
/* ICC profile arguments */
- List iccArgList = new LinkedList();
- while (st.hasMoreTokens()) {
- String str = st.nextToken().trim();
- iccArgList.add(new Float(str));
- }
- /* Copy ICC profile arguments from list to array */
- float[] iccComponents = new float[iccArgList.size()];
- for (int ix = 0; ix < iccArgList.size(); ix++) {
- iccComponents[ix] = ((Float)iccArgList.get(ix)).floatValue();
+ float[] iccComponents = new float[args.length - 5];
+ for (int ix = 4; ++ix < args.length;) {
+ iccComponents[ix - 5] = Float.parseFloat(args[ix].trim());
}
/* Ask FOP factory to get ColorSpace for the specified ICC profile source */
ColorSpace colorSpace = (foUserAgent != null
? foUserAgent.getFactory().getColorSpace(
foUserAgent.getBaseURL(), iccProfileSrc) : null);
+
+ float red = 0, green = 0, blue = 0;
+ red = Float.parseFloat(args[0].trim());
+ green = Float.parseFloat(args[1].trim());
+ blue = Float.parseFloat(args[2].trim());
+ /* Verify rgb replacement arguments */
+ if ((red < 0 || red > 1)
+ || (green < 0 || green > 1)
+ || (blue < 0 || blue > 1)) {
+ throw new PropertyException("Color values out of range. "
+ + "Fallback RGB arguments to fop-rgb-icc() must be [0..1]");
+ }
+
if (colorSpace != null) {
// ColorSpace available - create ColorExt (keeps track of replacement rgb
// values for possible later colorTOsRGBString call
@@ -375,15 +361,19 @@
// ICC profile could not be loaded - use rgb replacement values */
log.warn("Color profile '" + iccProfileSrc
+ "' not found. Using rgb replacement values.");
- parsedColor = new Color(red, green, blue);
+ parsedColor = new Color(Math.round(red * 255),
+ Math.round(green * 255), Math.round(blue * 255));
}
+ } catch (PropertyException pe) {
+ //simply re-throw
+ throw pe;
} catch (Exception e) {
- throw new PropertyException(
- "Arguments to rgb-icc() must be [0..255] or [0%..100%]");
+ //wrap in a PropertyException
+ throw new PropertyException(e);
}
} else {
throw new PropertyException("Unknown color format: " + value
- + ". Must be fop-rgb-icc(r,g,b,NCNAME,\"src\",....)");
+ + ". Must be fop-rgb-icc(r,g,b,NCNAME,src,....)");
}
return parsedColor;
}
@@ -403,61 +393,58 @@
int pose = value.indexOf(")");
if (poss != -1 && pose != -1) {
value = value.substring(poss + 1, pose);
- StringTokenizer st = new StringTokenizer(value, ",");
+ String[] args = value.split(",");
try {
+ if (args.length != 4) {
+ throw new PropertyException(
+ "Invalid number of arguments: cmyk(" + value + ")");
+ }
float cyan = 0.0f, magenta = 0.0f, yellow = 0.0f, black = 0.0f;
- if (st.hasMoreTokens()) {
- String str = st.nextToken().trim();
- if (str.endsWith("%")) {
- cyan = Float.parseFloat(str.substring(0,
- str.length() - 1)) / 100.0f;
- } else {
- cyan = Float.parseFloat(str);
- }
- }
- if (st.hasMoreTokens()) {
- String str = st.nextToken().trim();
- if (str.endsWith("%")) {
- magenta = Float.parseFloat(str.substring(0,
- str.length() - 1)) / 100.0f;
- } else {
- magenta = Float.parseFloat(str);
- }
- }
- if (st.hasMoreTokens()) {
- String str = st.nextToken().trim();
- if (str.endsWith("%")) {
- yellow = Float.parseFloat(str.substring(0,
- str.length() - 1)) / 100.0f;
- } else {
- yellow = Float.parseFloat(str);
- }
- }
- if (st.hasMoreTokens()) {
- String str = st.nextToken().trim();
- if (str.endsWith("%")) {
- black = Float.parseFloat(str.substring(0,
- str.length() - 1)) / 100.0f;
- } else {
- black = Float.parseFloat(str);
- }
- }
+ String str = args[0].trim();
+ if (str.endsWith("%")) {
+ cyan = Float.parseFloat(str.substring(0,
+ str.length() - 1)) / 100.0f;
+ } else {
+ cyan = Float.parseFloat(str);
+ }
+ str = args[1].trim();
+ if (str.endsWith("%")) {
+ magenta = Float.parseFloat(str.substring(0,
+ str.length() - 1)) / 100.0f;
+ } else {
+ magenta = Float.parseFloat(str);
+ }
+ str = args[2].trim();
+ if (str.endsWith("%")) {
+ yellow = Float.parseFloat(str.substring(0,
+ str.length() - 1)) / 100.0f;
+ } else {
+ yellow = Float.parseFloat(str);
+ }
+ str = args[3].trim();
+ if (str.endsWith("%")) {
+ black = Float.parseFloat(str.substring(0,
+ str.length() - 1)) / 100.0f;
+ } else {
+ black = Float.parseFloat(str);
+ }
+
if ((cyan < 0.0 || cyan > 1.0)
|| (magenta < 0.0 || magenta > 1.0)
|| (yellow < 0.0 || yellow > 1.0)
|| (black < 0.0 || black > 1.0)) {
- throw new PropertyException("Color values out of range");
+ throw new PropertyException("Color values out of range"
+ + "Arguments to cmyk() must be in the range [0%-100%] or [0.0-1.0]");
}
float[] cmyk = new float[] {cyan, magenta, yellow, black};
CMYKColorSpace cmykCs = CMYKColorSpace.getInstance();
float[] rgb = cmykCs.toRGB(cmyk);
parsedColor = ColorExt.createFromFoRgbIcc(rgb[0], rgb[1], rgb[2],
null, "#CMYK", cmykCs, cmyk);
-
-
+ } catch (PropertyException pe) {
+ throw pe;
} catch (Exception e) {
- throw new PropertyException(
- "Arguments to cmyk() must be in the range [0%-100%] or [0.0-1.0]");
+ throw new PropertyException(e);
}
} else {
throw new PropertyException("Unknown color format: " + value
@@ -668,7 +655,6 @@
colorMap.put("whitesmoke", new Color(245, 245, 245));
colorMap.put("yellow", new Color(255, 255, 0));
colorMap.put("yellowgreen", new Color(154, 205, 50));
-
colorMap.put("transparent", new Color(0, 0, 0, 0));
}
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/ColorUtil.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/CommandLineLogger.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/ContentHandlerFactory.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/ContentHandlerFactoryRegistry.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/DOM2SAX.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/DOMBuilderContentHandlerFactory.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/DataURIResolver.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/DataURLUtil.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/DefaultErrorListener.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/DelegatingContentHandler.java
------------------------------------------------------------------------------
svn:keywords = Id
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/LogUtil.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/LogUtil.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/LogUtil.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/LogUtil.java Thu Mar 6 05:33:44 2008
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
package org.apache.fop.util;
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/LogUtil.java
------------------------------------------------------------------------------
svn:keywords = Id
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/QName.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/QName.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/QName.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/QName.java Thu Mar 6 05:33:44 2008
@@ -1,51 +1,51 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* $Id$ */
-
-package org.apache.fop.util;
-
-/**
- * Represents a qualified name of an XML element or an XML attribute.
- * <p>
- * Note: This class allows to carry a namespace prefix but it is not used in the equals() and
- * hashCode() methods.
- */
-public class QName extends org.apache.xmlgraphics.util.QName {
-
- private static final long serialVersionUID = -5225376740044770690L;
-
- /**
- * Main constructor.
- * @param namespaceURI the namespace URI
- * @param prefix the namespace prefix, may be null
- * @param localName the local name
- */
- public QName(String namespaceURI, String prefix, String localName) {
- super(namespaceURI, prefix, localName);
- }
-
- /**
- * Main constructor.
- * @param namespaceURI the namespace URI
- * @param qName the qualified name
- */
- public QName(String namespaceURI, String qName) {
- super(namespaceURI, qName);
- }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id$ */
+
+package org.apache.fop.util;
+
+/**
+ * Represents a qualified name of an XML element or an XML attribute.
+ * <p>
+ * Note: This class allows to carry a namespace prefix but it is not used in the equals() and
+ * hashCode() methods.
+ */
+public class QName extends org.apache.xmlgraphics.util.QName {
+
+ private static final long serialVersionUID = -5225376740044770690L;
+
+ /**
+ * Main constructor.
+ * @param namespaceURI the namespace URI
+ * @param prefix the namespace prefix, may be null
+ * @param localName the local name
+ */
+ public QName(String namespaceURI, String prefix, String localName) {
+ super(namespaceURI, prefix, localName);
+ }
+
+ /**
+ * Main constructor.
+ * @param namespaceURI the namespace URI
+ * @param qName the qualified name
+ */
+ public QName(String namespaceURI, String qName) {
+ super(namespaceURI, qName);
+ }
+
+}
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/QName.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/QName.java
------------------------------------------------------------------------------
svn:keywords = Id
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/UnitConv.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/UnitConv.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/UnitConv.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/UnitConv.java Thu Mar 6 05:33:44 2008
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-/* $Id: FixedLength.java 279656 2005-09-08 22:06:48Z pietsch $ */
+/* $Id$ */
package org.apache.fop.util;
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/UnitConv.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/WriterOutputStream.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/java/org/apache/fop/util/XMLizable.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/sandbox/org/apache/fop/render/mif/MIFElement.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/sandbox/org/apache/fop/render/mif/MIFFOEventHandlerMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/sandbox/org/apache/fop/render/mif/MIFFOEventHandlerMaker.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/sandbox/org/apache/fop/render/mif/MIFFOEventHandlerMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/sandbox/org/apache/fop/render/mif/MIFFOEventHandlerMaker.java Thu Mar 6 05:33:44 2008
@@ -1,52 +1,52 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* $Id$ */
-
-package org.apache.fop.render.mif;
-
-import java.io.OutputStream;
-
-import org.apache.fop.apps.FOUserAgent;
-import org.apache.fop.apps.MimeConstants;
-import org.apache.fop.fo.FOEventHandler;
-import org.apache.fop.render.AbstractFOEventHandlerMaker;
-
-/**
- * Maker class for MIF support.
- */
-public class MIFFOEventHandlerMaker extends AbstractFOEventHandlerMaker {
-
- private static final String[] MIMES = new String[] {MimeConstants.MIME_MIF};
-
-
- /** @see org.apache.fop.render.AbstractFOEventHandlerMaker */
- public FOEventHandler makeFOEventHandler(FOUserAgent ua, OutputStream out) {
- return new MIFHandler(ua, out);
- }
-
- /** @see org.apache.fop.render.AbstractFOEventHandlerMaker#needsOutputStream() */
- public boolean needsOutputStream() {
- return true;
- }
-
- /** @see org.apache.fop.render.AbstractFOEventHandlerMaker#getSupportedMimeTypes() */
- public String[] getSupportedMimeTypes() {
- return MIMES;
- }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id$ */
+
+package org.apache.fop.render.mif;
+
+import java.io.OutputStream;
+
+import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.apps.MimeConstants;
+import org.apache.fop.fo.FOEventHandler;
+import org.apache.fop.render.AbstractFOEventHandlerMaker;
+
+/**
+ * Maker class for MIF support.
+ */
+public class MIFFOEventHandlerMaker extends AbstractFOEventHandlerMaker {
+
+ private static final String[] MIMES = new String[] {MimeConstants.MIME_MIF};
+
+
+ /** @see org.apache.fop.render.AbstractFOEventHandlerMaker */
+ public FOEventHandler makeFOEventHandler(FOUserAgent ua, OutputStream out) {
+ return new MIFHandler(ua, out);
+ }
+
+ /** @see org.apache.fop.render.AbstractFOEventHandlerMaker#needsOutputStream() */
+ public boolean needsOutputStream() {
+ return true;
+ }
+
+ /** @see org.apache.fop.render.AbstractFOEventHandlerMaker#getSupportedMimeTypes() */
+ public String[] getSupportedMimeTypes() {
+ return MIMES;
+ }
+
+}
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/sandbox/org/apache/fop/render/mif/MIFFOEventHandlerMaker.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/sandbox/org/apache/fop/render/mif/MIFFile.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/sandbox/org/apache/fop/render/mif/MIFHandler.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/sandbox/org/apache/fop/render/mif/PGFElement.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/sandbox/org/apache/fop/render/mif/RefElement.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/sandbox/org/apache/fop/render/mif/RulingElement.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Id
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/sandbox/org/apache/fop/render/svg/SVGRendererMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/sandbox/org/apache/fop/render/svg/SVGRendererMaker.java?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/sandbox/org/apache/fop/render/svg/SVGRendererMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/sandbox/org/apache/fop/render/svg/SVGRendererMaker.java Thu Mar 6 05:33:44 2008
@@ -1,50 +1,50 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* $Id$ */
-
-package org.apache.fop.render.svg;
-
-import org.apache.fop.apps.FOUserAgent;
-import org.apache.fop.apps.MimeConstants;
-import org.apache.fop.render.AbstractRendererMaker;
-import org.apache.fop.render.Renderer;
-
-/**
- * RendererMaker for the SVG Renderer.
- */
-public class SVGRendererMaker extends AbstractRendererMaker {
-
- private static final String[] MIMES = new String[] {MimeConstants.MIME_SVG};
-
-
- /**@see org.apache.fop.render.AbstractRendererMaker */
- public Renderer makeRenderer(FOUserAgent ua) {
- return new SVGRenderer();
- }
-
- /** @see org.apache.fop.render.AbstractRendererMaker#needsOutputStream() */
- public boolean needsOutputStream() {
- return true;
- }
-
- /** @see org.apache.fop.render.AbstractRendererMaker#getSupportedMimeTypes() */
- public String[] getSupportedMimeTypes() {
- return MIMES;
- }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id$ */
+
+package org.apache.fop.render.svg;
+
+import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.apps.MimeConstants;
+import org.apache.fop.render.AbstractRendererMaker;
+import org.apache.fop.render.Renderer;
+
+/**
+ * RendererMaker for the SVG Renderer.
+ */
+public class SVGRendererMaker extends AbstractRendererMaker {
+
+ private static final String[] MIMES = new String[] {MimeConstants.MIME_SVG};
+
+
+ /**@see org.apache.fop.render.AbstractRendererMaker */
+ public Renderer makeRenderer(FOUserAgent ua) {
+ return new SVGRenderer();
+ }
+
+ /** @see org.apache.fop.render.AbstractRendererMaker#needsOutputStream() */
+ public boolean needsOutputStream() {
+ return true;
+ }
+
+ /** @see org.apache.fop.render.AbstractRendererMaker#getSupportedMimeTypes() */
+ public String[] getSupportedMimeTypes() {
+ return MIMES;
+ }
+
+}
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/src/sandbox/org/apache/fop/render/svg/SVGRendererMaker.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/status.xml?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/status.xml (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/status.xml Thu Mar 6 05:33:44 2008
@@ -16,18 +16,161 @@
limitations under the License.
-->
<!-- $Id$ -->
+<!DOCTYPE status PUBLIC "-//APACHE//DTD Status V1.3//EN"
+ "http://forrest.apache.org/dtd/status-v13.dtd">
<status>
<developers>
- <!-- Maintained in src/documentation/content/xdocs/team.xml -->
+ <!-- In alphabetical order (last name) -->
+ <person name="Max Berger" email="mayberger@apache.org" id="MB"/>
+ <person name="Chris Bowditch" email="cbowditch@apache.org" id="CB"/>
+ <person name="Jay Bryant" email="jbryant@apache.org" id="JB"/>
+ <person name="Adrian Cumiskey" email="acumiskey@apache.org" id="AC"/>
+ <person name="Bertrand Delacrétaz" email="bdelacretaz@apache.org" id="BD"/>
+ <person name="Andreas Delmelle" email="adelmelle@apache.org" id="AD"/>
+ <person name="Luca Furini" email="lfurini@apache.org" id="LF"/>
+ <person name="Christian Geisert" email="chrisg@apache.org" id="CG"/>
+ <person name="Vincent Hennebert" email="vhennebert@apache.org" id="VH"/>
+ <person name="Clay Leeds" email="clay@apache.org" id="CL"/>
+ <person name="Manuel Mall" email="manuel@apache.org" id="MM"/>
+ <person name="Jeremias Märki" email="jeremias@apache.org" id="JM"/>
+ <person name="Simon Pepping" email="spepping@apache.org" id="SP"/>
+ <person name="the FOP committers" email="fop-dev@xmlgraphics.apache.org" id="all"/>
+ <person name="Volunteer needed" email="general@xmlgraphics.apache.org" id="open"/>
+ <!-- See also src/documentation/content/xdocs/team.xml -->
</developers>
- <todo>
- <!-- See Bugzilla and http://wiki.apache.org/xmlgraphics-fop/FOPProjectTasks -->
- </todo>
-
+ <contexts>
+ <context id="Docs" title="Changes to Documentation"/>
+ <context id="Code" title="Changes to the Code Base"/>
+ <context id="Layout" title="Changes to the Layout Engine"/>
+ <context id="Renderers" title="Changes to Renderers (Output Formats)"/>
+ <context id="Fonts" title="Changes to the Font Subsystem"/>
+ <context id="API" title="Changes to the End-User API"/>
+ <context id="Extensions" title="Changes to the Bundled Extensions"/>
+ <context id="Images" title="Changes to the Image Support"/>
+ </contexts>
+
<changes>
- <release version="FOP Trunk">
+ <!--release version="FOP Trunk" date="TBD"-->
+ <!-- change reverted, to be added back later
+ <action context="Renderers" dev="AC" importance="high" type="add">
+ Added SVG support for AFP (GOCA).
+ </action>
+ -->
+ <!--/release-->
+ <release version="0.95beta" date="8 March 2008">
+ <notes>
+ <section>
+ <title>Notes</title>
+ <p>
+ Besides the important changes listed below, the most important areas with
+ improvements in this release are:
+ </p>
+ <ul>
+ <li>
+ Improvements and bugfixes for tables (keep and break support, border
+ conditionality etc.)
+ </li>
+ <li>
+ Improvements and bugfixes for font handling and font
+ auto-detection/-registration.
+ </li>
+ <li>
+ Performance improvements and memory optimizations for the property handling
+ in the FO tree.
+ </li>
+ </ul>
+ <p>
+ Please note that with this release, we've dropped support for Java 1.3.
+ FOP will, from now on, <strong>require at least Java 1.4</strong>.
+ </p>
+ <p>
+ The image libraries Jimi and JAI are no longer needed (and used). Instead we rely
+ completely on the Image I/O API that has been introduced with Java 1.4. If you still
+ need support for bitmap image formats that do not work out-of-the-box, we recommend
+ adding <link href="http://jai-imageio.dev.java.net/">JAI Image I/O Tools</link>
+ (an Image I/O compatible image codec package) to the classpath.
+ </p>
+ </section>
+ </notes>
+ <action context="Layout" dev="VH" type="add" importance="high">
+ Added support for background on fo:table-column and fo:table-header/footer/body elements.
+ </action>
+ <action context="Layout" dev="VH" type="fix">
+ Fixed the rendering of the area of a table corresponding to border-separation, which must
+ be filled with the background of the table, and not the rows.
+ </action>
+ <action context="Layout" dev="VH" type="fix">
+ Improved conformance: even if a table-cell spans several rows its background must
+ correspond to the first row spanned.
+ </action>
+ <action context="Renderers" dev="JM" type="fix" due-to="Gordon Cooke">
+ Slight improvement for thin lines in Java2D/AWT output.
+ </action>
+ <action context="Layout" dev="VH" type="add">
+ Added full support for keep-with-previous on fo:table-row and in fo:table-cell elements.
+ </action>
+ <action context="Code" dev="MB" type="add">
+ Turned on XInclude processing for the main source given on the command line.
+ </action>
+ <action context="Fonts" dev="JM" type="fix" fixes-bug="44451" due-to="Justus Piater">
+ Improved the font auto-detection so fonts accessed using the font-family name are
+ selected with higher accuracy.
+ </action>
+ <action context="API" dev="JM" type="remove">
+ Removed deprecated methods in the "apps" package that were left-overs from the API
+ discussions.
+ </action>
+ <action context="Fonts" dev="JM" type="add">
+ Added support for unusual font encodings (like for Symbol or Cyrillic fonts) of Type 1
+ fonts in PDF and PostScript output.
+ </action>
+ <action context="Layout" dev="VH" type="fix" fixes-bug="44321">
+ Moved to the FO tree stage the check for break-before/after on table-row while spanning in
+ progress.
+ </action>
+ <action context="Layout" dev="VH" type="add">
+ Added full support for breaks before and after table cells (that is, break-before/after set
+ on the first/last child of a cell).
+ </action>
+ <action context="Layout" dev="VH" type="add">
+ Added full support for breaks inside the cells of a table.
+ </action>
+ <action context="Code" dev="AD" type="fix" fixes-bug="41631">
+ Added correct percentage resolution for arguments to the proportional-column-width() function.
+ </action>
+ <action context="Fonts" dev="JM" type="fix">
+ Bugfix for date formatting with negative time zones in the PDF's Info object.
+ This affected PDF/A compliance.
+ </action>
+ <action context="Renderers" dev="JM" type="add">
+ Added an option to disable the default sRGB profile in PDF output for those who
+ don't care about color fidelity, but care about PDF file size.
+ </action>
+ <action context="Code" dev="AD" type="fix" fixes-bug="43705">
+ Fixed a bug when the rgb-icc() function was used either before the fo:declarations,
+ or in documents without a fo:declarations node. In such cases, the sRGB fallback
+ is now used to avoid an ugly NullPointerException.
+ </action>
+ <action context="Code" dev="AD" type="add">
+ Added very basic parsing for the xml:lang shorthand.
+ </action>
+ <action context="Code" dev="AD" type="fix" fixes-bug="44343">
+ Fixed a bug when using relative font-size (smaller/larger) in combination
+ with percentages.
+ </action>
+ <action context="Fonts" dev="JM" type="fix">
+ Bugfix for handling of optional tables in subset TrueType fonts. This bug caused errors
+ in various PDF viewers.
+ </action>
+ <action context="Renderers" dev="JM" type="add">
+ Added support for the natural language indentifier ("Lang" in the document catalog)
+ for PDF documents based on the language/country values on fo:page-sequence.
+ </action>
+ <action context="Code" dev="AD" type="fix" fixes-bug="44286" due-to="Stefan Ziel">
+ Fixed a memory-leak in XMLWhiteSpaceHandler.
+ </action>
<action context="Layout" dev="VH" type="fix" fixes-bug="44289">
Fixed the resolution of borders when header/footer is omitted at page breaks.
</action>
@@ -71,7 +214,7 @@
<action context="Renderers" dev="JM" type="add" fixes-bug="44176" due-to="Patrick Jaromin">
Added support for custom fonts in Java2DRenderer and derived renderers.
</action>
- <action context="Extensions" dev="JM" type="add">
+ <action context="Extensions" dev="JM" type="add" importance="high">
Added new extension element: fox:external-document. It allows to add whole documents
such as multi-page TIFF images to be inserted as peers to a page-sequence. Each image
will make up an entire page. See the documentation for details.
@@ -80,15 +223,12 @@
Added minimal support for the .minimum/.maximum components of block/inline-progression-dimension
on fo:external-graphic and fo:instream-foreign-object.
</action>
- <action context="Layout" dev="JM" type="add">
+ <action context="Layout" dev="JM" type="add" importance="high">
Added support for scale-down-to-fit and scale-up-to-fit (introduced in XSL 1.1).
</action>
<action context="Layout" dev="VH" type="fix" fixes-bug="43633">
Bugfix: content of a row with zero height overriding the previous row
</action>
- <action context="Renderers" dev="AC" importance="high" type="add">
- Added SVG support for AFP (GOCA).
- </action>
<action context="Renderers" dev="JM" type="fix" fixes-bug="37993">
Bugfix: allow multiple bookmarks to point at the same destination.
</action>
@@ -169,7 +309,7 @@
<action context="Layout" dev="AD" type="add">
Added support for fo:markers in fo:inline and fo:basic-link.
</action>
- <action context="Renderers" dev="JM" type="update">
+ <action context="Renderers" dev="JM" type="update" importance="high">
PDF Transcoder (SVG) text painting has been completely rewritten.
Except for some special cases (with filters for example), all text
(including flow text) is now painted using PDF text operators.
@@ -216,31 +356,21 @@
Added a configuration setting for the renderer/device resolution to the AFP renderer.
</action>
<action context="Layout" dev="AD" type="update">
- <p>
- Facilitate the implementation for font-selection-strategy:
- </p>
- <ul>
- <li>Changed FontInfo.fontLookup to always return an array of FontTriplet</li>
- <li>Changed CommonFont.getFontState to return an array of FontTriplet</li>
- <li>Initial modifications to the related LMs: initialized with
- the font corresponding to the first of the triplets</li>
- </ul>
+ Facilitate the implementation for font-selection-strategy:<br/>
+ ⢠Changed FontInfo.fontLookup to always return an array of FontTriplet.<br/>
+ ⢠Changed CommonFont.getFontState to return an array of FontTriplet.<br/>
+ ⢠Initial modifications to the related LMs: initialized with
+ the font corresponding to the first of the triplets.<br/>
</action>
<action context="Layout" dev="AD" type="update">
- <p>PropertyCache phase 2:</p>
- <ul>
- <li>
- improvement of the PropertyCache itself should now guarantee acceptable
+ PropertyCache phase 2:<br/>
+ ⢠improvement of the PropertyCache itself should now guarantee acceptable
performance of the static caches in multi-session environments, which is
- a possible problem with synchronizedMap
- </li>
- <li>
- changed CommonFont to use the cache:
+ a possible problem with synchronizedMap.<br/>
+ ⢠changed CommonFont to use the cache:
added CachedCommonFont to contain the properties that are always cacheable
- CommonFont itself is only cached if the remaining properties are absolutes
- </li>
- <li>changed CommonHyphenation, KeepProperty, ColorProperty and FontFamilyProperty to use the cache</li>
- </ul>
+ CommonFont itself is only cached if the remaining properties are absolutes.<br/>
+ ⢠changed CommonHyphenation, KeepProperty, ColorProperty and FontFamilyProperty to use the cache.<br/>
</action>
<action context="Layout" dev="AD" type="fix" fixes-bug="42705">
Fixed swallowing PCDATA in text-node children of
@@ -400,33 +530,36 @@
</release>
<release version="0.93" date="9 January 2007">
<notes>
- <p>This is the first production grade release of the new FOP
- codebase.</p>
- <ul>
- <li>It contains the new API first introduced in release 0.92
- beta. The preceding API has been removed.
- </li>
- <li>
- See the <a href="../compliance.html">compliance page</a> for an
- overview of the compliance of this release with the XSL 1.0 and
- 1.1 recommendations.
- </li>
- <li>
- This release again contains many bug fixes and new features. See
- below for details.
- </li>
- <li>
- See the <a href="../knownissues.html">known issues page</a>
- for an overview of the known issues with this release.
- </li>
- </ul>
- <p>Caveats:</p>
- <ul>
- <li>
- You may experience different behaviour compared to version 0.20.5.
- Please consult the <a href="upgrading.html">"Upgrading"</a> page for details.
- </li>
- </ul>
+ <section>
+ <title>Notes</title>
+ <p>This is the first production grade release of the new FOP
+ codebase.</p>
+ <ul>
+ <li>It contains the new API first introduced in release 0.92
+ beta. The preceding API has been removed.
+ </li>
+ <li>
+ See the <link href="../compliance.html">compliance page</link> for an
+ overview of the compliance of this release with the XSL 1.0 and
+ 1.1 recommendations.
+ </li>
+ <li>
+ This release again contains many bug fixes and new features. See
+ below for details.
+ </li>
+ <li>
+ See the <link href="../knownissues.html">known issues page</link>
+ for an overview of the known issues with this release.
+ </li>
+ </ul>
+ <p>Caveats:</p>
+ <ul>
+ <li>
+ You may experience different behaviour compared to version 0.20.5.
+ Please consult the <link href="upgrading.html">"Upgrading"</link> page for details.
+ </li>
+ </ul>
+ </section>
</notes>
<action context="Code" dev="BD" type="add" importance="high">
Added support for the use of Open Type fonts
@@ -1001,9 +1134,18 @@
<action context="Code" dev="all" type="update">
For the change log for the maintenance branch
(where FOP 0.20.5 came from), please see the "CHANGES" file in the distribution, or
- <a href="http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/branches/fop-0_20_2-maintain/CHANGES?view=markup">the CHANGES file in the SVN repository</a>.
+ <link href="http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/branches/fop-0_20_2-maintain/CHANGES?view=markup">the CHANGES file in the SVN repository</link>.
</action>
</release>
</changes>
+ <todo>
+ <!-- See Bugzilla and http://wiki.apache.org/xmlgraphics-fop/FOPProjectTasks -->
+ <actions>
+ <action dev="open" type="update" context="Docs">
+ Improve the documentation.
+ </action>
+ </actions>
+ </todo>
+
</status>
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/status.xml
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Revision Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/test/basictests.xml
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Revision Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/test/bugtests.xml
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Author Date Id Revision
+Revision Id
Propchange: xmlgraphics/fop/branches/Temp_ProcessingFeedback/test/fotree/disabled-testcases.xml
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Thu Mar 6 05:33:44 2008
@@ -1 +1 @@
-Id
+Revision Id
Modified: xmlgraphics/fop/branches/Temp_ProcessingFeedback/test/fotree/testcases/background-position-shorthand-test.fo
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ProcessingFeedback/test/fotree/testcases/background-position-shorthand-test.fo?rev=634267&r1=634266&r2=634267&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ProcessingFeedback/test/fotree/testcases/background-position-shorthand-test.fo (original)
+++ xmlgraphics/fop/branches/Temp_ProcessingFeedback/test/fotree/testcases/background-position-shorthand-test.fo Thu Mar 6 05:33:44 2008
@@ -25,47 +25,59 @@
<fo:page-sequence master-reference="simpleA4">
<fo:flow flow-name="xsl-region-body">
<fo:block background-image="../../resources/images/bgimg72dpi.jpg">
- <test:assert property="background-position-horizontal" expected="0.0%"/>
- <test:assert property="background-position-vertical" expected="0.0%"/>
+ <test:assert property="background-position-horizontal" expected="0mpt"/>
+ <test:assert property="background-position-vertical" expected="0mpt"/>
Test background-position shorthand: initial values
</fo:block>
<fo:block background-image="../../resources/images/bgimg72dpi.jpg"
background-position="50% 50%">
- <test:assert property="background-position-horizontal" expected="0.5"/>
- <test:assert property="background-position-vertical" expected="0.5"/>
+ <test:assert property="background-position-horizontal" expected="50.0%"/>
+ <test:assert property="background-position-vertical" expected="50.0%"/>
Test background-position shorthand: "50% 50%"
</fo:block>
<fo:block background-image="../../resources/images/bgimg72dpi.jpg"
background-position="2in 50%">
<test:assert property="background-position-horizontal" expected="144000mpt"/>
- <test:assert property="background-position-vertical" expected="0.5"/>
+ <test:assert property="background-position-vertical" expected="50.0%"/>
Test background-position shorthand: "2in 50%"
</fo:block>
<fo:block background-image="../../resources/images/bgimg72dpi.jpg"
background-position="100%">
- <test:assert property="background-position-horizontal" expected="1.0"/>
+ <test:assert property="background-position-horizontal" expected="100.0%"/>
<test:assert property="background-position-vertical" expected="50.0%"/>
Test background-position shorthand: "100%"
</fo:block>
<fo:block background-image="../../resources/images/bgimg72dpi.jpg"
background-position="top center">
- <test:assert property="background-position-horizontal" expected="top"/>
- <test:assert property="background-position-vertical" expected="center"/>
+ <test:assert property="background-position-horizontal" expected="50.0%"/>
+ <test:assert property="background-position-vertical" expected="0mpt"/>
Test background-position shorthand: "top center"
</fo:block>
<fo:block background-image="../../resources/images/bgimg72dpi.jpg"
background-position="right bottom">
- <test:assert property="background-position-horizontal" expected="right"/>
- <test:assert property="background-position-vertical" expected="bottom"/>
+ <test:assert property="background-position-horizontal" expected="100.0%"/>
+ <test:assert property="background-position-vertical" expected="100.0%"/>
Test background-position shorthand: "right bottom"
</fo:block>
<fo:block background-position="right bottom">
<fo:block background-image="../../resources/images/bgimg72dpi.jpg"
background-position="inherit">
- <test:assert property="background-position-horizontal" expected="right"/>
- <test:assert property="background-position-vertical" expected="bottom"/>
+ <test:assert property="background-position-horizontal" expected="100.0%"/>
+ <test:assert property="background-position-vertical" expected="100.0%"/>
Test background-position shorthand: "inherit"
</fo:block>
+ </fo:block>
+ <fo:block background-image="../../resources/images/bgimg72dpi.jpg"
+ background-position="top right">
+ <test:assert property="background-position-horizontal" expected="100.0%"/>
+ <test:assert property="background-position-vertical" expected="0mpt"/>
+ Test background-position shorthand: "top right"
+ </fo:block>
+ <fo:block background-image="../../resources/images/bgimg72dpi.jpg"
+ background-position="center">
+ <test:assert property="background-position-horizontal" expected="50.0%"/>
+ <test:assert property="background-position-vertical" expected="50.0%"/>
+ Test background-position shorthand: "center"
</fo:block>
</fo:flow>
</fo:page-sequence>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org