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 vh...@apache.org on 2008/07/24 11:37:16 UTC
svn commit: r679326 [22/33] - in /xmlgraphics/fop/trunk:
examples/embedding/java/embedding/ examples/embedding/java/embedding/events/
examples/embedding/java/embedding/intermediate/
examples/embedding/java/embedding/model/ examples/embedding/java/embed...
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/StreamCacheFactory.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/StreamCacheFactory.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/StreamCacheFactory.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/StreamCacheFactory.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.pdf;
import java.io.IOException;
@@ -31,7 +31,7 @@
private static StreamCacheFactory memoryInstance = null;
private boolean cacheToFile = false;
-
+
/**
* Returns an instance of a StreamCacheFactory with the requested features.
* @param cacheToFile True if file shall be cached using a temporary file
@@ -50,7 +50,7 @@
return memoryInstance;
}
}
-
+
/**
* Returns an instance of a StreamCacheFactory depending on the default
* setting for cacheToFile.
@@ -59,7 +59,7 @@
public static StreamCacheFactory getInstance() {
return getInstance(defaultCacheToFile);
}
-
+
/**
* Sets the global default for cacheToFile
* @param cacheToFile True if stream caches should be held in files.
@@ -75,7 +75,7 @@
public StreamCacheFactory(boolean cacheToFile) {
this.cacheToFile = cacheToFile;
}
-
+
/**
* Get the correct implementation (based on cacheToFile) of
* StreamCache.
@@ -89,7 +89,7 @@
return new InMemoryStreamCache();
}
}
-
+
/**
* Get the correct implementation (based on cacheToFile) of
* StreamCache.
@@ -104,7 +104,7 @@
return new InMemoryStreamCache(hintSize);
}
}
-
+
/**
* Get the value of the global cacheToFile flag.
* @return the current cache to file flag
@@ -112,6 +112,6 @@
public boolean getCacheToFile() {
return this.cacheToFile;
}
-
+
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/TempFileStreamCache.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/TempFileStreamCache.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/TempFileStreamCache.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/TempFileStreamCache.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.pdf;
// Java
@@ -75,7 +75,7 @@
public void write(byte[] data) throws IOException {
getOutputStream().write(data);
}
-
+
/**
* Outputs the cached bytes to the given stream.
*
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/TransitionDictionary.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/TransitionDictionary.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/TransitionDictionary.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/TransitionDictionary.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.pdf;
/**
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractFOEventHandlerMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractFOEventHandlerMaker.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractFOEventHandlerMaker.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractFOEventHandlerMaker.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* 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.
@@ -30,7 +30,7 @@
* about them.
*/
public abstract class AbstractFOEventHandlerMaker {
-
+
/**
* Instantiates a new FOEventHandler.
* @param ua the user agent
@@ -45,7 +45,7 @@
* @return Indicates whether this renderer requires an OutputStream to work with.
*/
public abstract boolean needsOutputStream();
-
+
/**
* @return an array of MIME types the renderer supports.
*/
@@ -65,5 +65,5 @@
}
return false;
}
-
+
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractGenericSVGHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractGenericSVGHandler.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractGenericSVGHandler.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractGenericSVGHandler.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* 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.
@@ -49,7 +49,7 @@
public abstract class AbstractGenericSVGHandler implements XMLHandler, RendererContextConstants {
/** {@inheritDoc} */
- public void handleXML(RendererContext context,
+ public void handleXML(RendererContext context,
Document doc, String ns) throws Exception {
if (SVGDOMImplementation.SVG_NAMESPACE_URI.equals(ns)) {
@@ -111,8 +111,8 @@
//Let the painter paint the SVG on the Graphics2D instance
Graphics2DAdapter adapter = context.getRenderer().getGraphics2DAdapter();
- adapter.paintImage(painter, context,
- x, y, wrappedContext.getWidth(), wrappedContext.getHeight());
+ adapter.paintImage(painter, context,
+ x, y, wrappedContext.getWidth(), wrappedContext.getHeight());
}
/**
@@ -128,7 +128,7 @@
}
return docURI;
}
-
+
/**
* Override this method to update the renderer context if it needs special settings for
* certain conditions.
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractGraphics2DAdapter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractGraphics2DAdapter.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractGraphics2DAdapter.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractGraphics2DAdapter.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.render;
import java.awt.Color;
@@ -52,7 +52,7 @@
* @return the generated BufferedImage
*/
protected BufferedImage paintToBufferedImage(
- org.apache.xmlgraphics.java2d.Graphics2DImagePainter painter,
+ org.apache.xmlgraphics.java2d.Graphics2DImagePainter painter,
RendererContextWrapper context, int resolution, boolean gray, boolean withAlpha) {
int bmw = (int)Math.ceil(UnitConv.mpt2px(context.getWidth(), resolution));
int bmh = (int)Math.ceil(UnitConv.mpt2px(context.getHeight(), resolution));
@@ -72,10 +72,10 @@
}
Graphics2D g2d = bi.createGraphics();
try {
- g2d.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,
+ g2d.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,
RenderingHints.VALUE_FRACTIONALMETRICS_ON);
setRenderingHintsForBufferedImage(g2d);
-
+
g2d.setBackground(Color.white);
g2d.setColor(Color.black);
if (!withAlpha) {
@@ -130,18 +130,18 @@
* @param g2d the Graphics2D instance
*/
protected void setRenderingHintsForBufferedImage(Graphics2D g2d) {
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_OFF);
- g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
+ g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
}
/** {@inheritDoc} */
- public void paintImage(Graphics2DImagePainter painter,
+ public void paintImage(Graphics2DImagePainter painter,
RendererContext context,
int x, int y, int width, int height) throws IOException {
paintImage((org.apache.xmlgraphics.java2d.Graphics2DImagePainter)painter,
context, x, y, width, height);
}
-
+
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractPathOrientedRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractPathOrientedRenderer.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractPathOrientedRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractPathOrientedRenderer.java Thu Jul 24 02:35:34 2008
@@ -66,7 +66,7 @@
protected void handleBlockTraits(Block block) {
int borderPaddingStart = block.getBorderAndPaddingWidthStart();
int borderPaddingBefore = block.getBorderAndPaddingWidthBefore();
-
+
float startx = currentIPPosition / 1000f;
float starty = currentBPPosition / 1000f;
float width = block.getIPD() / 1000f;
@@ -151,10 +151,10 @@
BorderProps bpsEnd = (BorderProps)borderArea.getTrait(Trait.BORDER_END);
drawBackground(startx, starty, width, height,
- (Trait.Background) backgroundArea.getTrait(Trait.BACKGROUND),
+ (Trait.Background) backgroundArea.getTrait(Trait.BACKGROUND),
bpsBefore, bpsAfter, bpsStart, bpsEnd);
drawBorders(startx, starty, width, height,
- bpsBefore, bpsAfter, bpsStart, bpsEnd);
+ bpsBefore, bpsAfter, bpsStart, bpsEnd);
}
/**
@@ -204,13 +204,13 @@
fillRect(sx, sy, paddRectWidth, paddRectHeight);
}
if (back.getImageInfo() != null) {
- ImageSize imageSize = back.getImageInfo().getSize();
+ ImageSize imageSize = back.getImageInfo().getSize();
saveGraphicsState();
clipRect(sx, sy, paddRectWidth, paddRectHeight);
- int horzCount = (int)((paddRectWidth
- * 1000 / imageSize.getWidthMpt()) + 1.0f);
- int vertCount = (int)((paddRectHeight
- * 1000 / imageSize.getHeightMpt()) + 1.0f);
+ int horzCount = (int)((paddRectWidth
+ * 1000 / imageSize.getWidthMpt()) + 1.0f);
+ int vertCount = (int)((paddRectHeight
+ * 1000 / imageSize.getHeightMpt()) + 1.0f);
if (back.getRepeat() == EN_NOREPEAT) {
horzCount = 1;
vertCount = 1;
@@ -233,7 +233,7 @@
// place once
Rectangle2D pos;
// Image positions are relative to the currentIP/BP
- pos = new Rectangle2D.Float(sx - currentIPPosition
+ pos = new Rectangle2D.Float(sx - currentIPPosition
+ (x * imageSize.getWidthMpt()),
sy - currentBPPosition
+ (y * imageSize.getHeightMpt()),
@@ -242,7 +242,7 @@
drawImage(back.getURL(), pos);
}
}
-
+
restoreGraphicsState();
}
}
@@ -277,14 +277,14 @@
* @param bpsStart the border specification on the start side
* @param bpsEnd the border specification on the end side
*/
- protected void drawBorders(Rectangle2D.Float borderRect,
+ protected void drawBorders(Rectangle2D.Float borderRect,
BorderProps bpsBefore, BorderProps bpsAfter, BorderProps bpsStart, BorderProps bpsEnd) {
float startx = borderRect.x;
float starty = borderRect.y;
float width = borderRect.width;
float height = borderRect.height;
boolean[] b = new boolean[] {
- (bpsBefore != null), (bpsEnd != null),
+ (bpsBefore != null), (bpsEnd != null),
(bpsAfter != null), (bpsStart != null)};
if (!b[0] && !b[1] && !b[2] && !b[3]) {
return;
@@ -295,9 +295,9 @@
(b[2] ? bpsAfter.width / 1000f : 0.0f),
(b[3] ? bpsStart.width / 1000f : 0.0f)};
float[] clipw = new float[] {
- BorderProps.getClippedWidth(bpsBefore) / 1000f,
- BorderProps.getClippedWidth(bpsEnd) / 1000f,
- BorderProps.getClippedWidth(bpsAfter) / 1000f,
+ BorderProps.getClippedWidth(bpsBefore) / 1000f,
+ BorderProps.getClippedWidth(bpsEnd) / 1000f,
+ BorderProps.getClippedWidth(bpsAfter) / 1000f,
BorderProps.getClippedWidth(bpsStart) / 1000f};
starty += clipw[0];
height -= clipw[0];
@@ -305,7 +305,7 @@
startx += clipw[3];
width -= clipw[3];
width -= clipw[1];
-
+
boolean[] slant = new boolean[] {
(b[3] && b[0]), (b[0] && b[1]), (b[1] && b[2]), (b[2] && b[3])};
if (bpsBefore != null) {
@@ -338,7 +338,7 @@
lineTo(sx2, innery);
closePath();
clip();
- drawBorderLine(sx1a, outery, ex1a, innery, true, true,
+ drawBorderLine(sx1a, outery, ex1a, innery, true, true,
bpsBefore.style, bpsBefore.color);
restoreGraphicsState();
}
@@ -352,7 +352,7 @@
float outerx = startx + width + clipw[1];
float clipx = outerx - clipw[1];
float innerx = outerx - bw[1];
-
+
saveGraphicsState();
moveTo(clipx, sy1);
float sy1a = sy1;
@@ -442,8 +442,8 @@
restoreGraphicsState();
}
}
-
- /**
+
+ /**
* Common method to render the background and borders for any inline area.
* The all borders and padding are drawn outside the specified area.
* @param area the inline area for which the background, border and padding is to be
@@ -456,22 +456,22 @@
float height = area.getBPD() / 1000f;
float borderPaddingStart = area.getBorderAndPaddingWidthStart() / 1000f;
float borderPaddingBefore = area.getBorderAndPaddingWidthBefore() / 1000f;
- float bpwidth = borderPaddingStart
+ float bpwidth = borderPaddingStart
+ (area.getBorderAndPaddingWidthEnd() / 1000f);
float bpheight = borderPaddingBefore
+ (area.getBorderAndPaddingWidthAfter() / 1000f);
-
+
if (height != 0.0f || bpheight != 0.0f && bpwidth != 0.0f) {
drawBackAndBorders(area, x, y - borderPaddingBefore
, width + bpwidth
, height + bpheight);
}
-
+
}
-
+
private static final QName FOX_TRANSFORM
= new QName(ExtensionElementMapping.URI, "fox:transform");
-
+
/** {@inheritDoc} */
protected void renderBlockViewport(BlockViewport bv, List children) {
// clip and position viewport if necessary
@@ -497,10 +497,10 @@
if (bv.getPositioning() == Block.FIXED) {
breakOutList = breakOutOfStateStack();
}
-
+
AffineTransform positionTransform = new AffineTransform();
positionTransform.translate(bv.getXOffset(), bv.getYOffset());
-
+
//"left/"top" (bv.getX/YOffset()) specify the position of the content rectangle
positionTransform.translate(-borderPaddingStart, -borderPaddingBefore);
@@ -515,7 +515,7 @@
saveGraphicsState();
//Viewport position
concatenateTransformationMatrix(mptToPt(positionTransform));
-
+
//Background and borders
float bpwidth = (borderPaddingStart + bv.getBorderAndPaddingWidthEnd()) / 1000f;
float bpheight = (borderPaddingBefore + bv.getBorderAndPaddingWidthAfter()) / 1000f;
@@ -525,7 +525,7 @@
AffineTransform contentRectTransform = new AffineTransform();
contentRectTransform.translate(borderPaddingStart, borderPaddingBefore);
concatenateTransformationMatrix(mptToPt(contentRectTransform));
-
+
//Clipping
if (bv.getClip()) {
clipRect(0f, 0f, width, height);
@@ -535,18 +535,18 @@
//Set up coordinate system for content rectangle
AffineTransform contentTransform = ctm.toAffineTransform();
concatenateTransformationMatrix(mptToPt(contentTransform));
-
+
currentIPPosition = 0;
currentBPPosition = 0;
renderBlocks(bv, children);
restoreGraphicsState();
restoreGraphicsState();
-
+
if (breakOutList != null) {
restoreStateStackAfterBreakOut(breakOutList);
}
-
+
currentIPPosition = saveIP;
currentBPPosition = saveBP;
} else {
@@ -561,16 +561,16 @@
CTM tempctm = new CTM(containingIPPosition, currentBPPosition);
ctm = tempctm.multiply(ctm);
-
+
//Now adjust for border/padding
currentBPPosition += borderPaddingBefore;
Rectangle2D clippingRect = null;
if (bv.getClip()) {
- clippingRect = new Rectangle(currentIPPosition, currentBPPosition,
+ clippingRect = new Rectangle(currentIPPosition, currentBPPosition,
bv.getIPD(), bv.getBPD());
}
-
+
startVParea(ctm, clippingRect);
currentIPPosition = 0;
currentBPPosition = 0;
@@ -579,7 +579,7 @@
currentIPPosition = saveIP;
currentBPPosition = saveBP;
-
+
currentBPPosition += (int)(bv.getAllocBPD());
}
}
@@ -595,7 +595,7 @@
at.translate(currentIPPosition, currentBPPosition);
at.translate(block.getXOffset(), block.getYOffset());
at.translate(0, block.getSpaceBefore());
-
+
if (!at.isIdentity()) {
saveGraphicsState();
concatenateTransformationMatrix(mptToPt(at));
@@ -613,12 +613,12 @@
if (!at.isIdentity()) {
restoreGraphicsState();
}
-
+
// stacked and relative blocks effect stacking
currentIPPosition = saveIP;
currentBPPosition = saveBP;
}
-
+
/** {@inheritDoc} */
protected void renderFlow(NormalFlow flow) {
// save position and offset
@@ -628,7 +628,7 @@
//Establish a new coordinate system
AffineTransform at = new AffineTransform();
at.translate(currentIPPosition, currentBPPosition);
-
+
if (!at.isIdentity()) {
saveGraphicsState();
concatenateTransformationMatrix(mptToPt(at));
@@ -637,23 +637,23 @@
currentIPPosition = 0;
currentBPPosition = 0;
super.renderFlow(flow);
-
+
if (!at.isIdentity()) {
restoreGraphicsState();
}
-
+
// stacked and relative blocks effect stacking
currentIPPosition = saveIP;
currentBPPosition = saveBP;
}
-
+
/**
* Concatenates the current transformation matrix with the given one, therefore establishing
* a new coordinate system.
* @param at the transformation matrix to process (coordinates in points)
*/
protected abstract void concatenateTransformationMatrix(AffineTransform at);
-
+
/**
* Render an inline viewport.
* This renders an inline viewport by clipping if necessary.
@@ -665,10 +665,10 @@
float y = (currentBPPosition + viewport.getOffset()) / 1000f;
float width = viewport.getIPD() / 1000f;
float height = viewport.getBPD() / 1000f;
- // TODO: Calculate the border rect correctly.
+ // TODO: Calculate the border rect correctly.
float borderPaddingStart = viewport.getBorderAndPaddingWidthStart() / 1000f;
float borderPaddingBefore = viewport.getBorderAndPaddingWidthBefore() / 1000f;
- float bpwidth = borderPaddingStart
+ float bpwidth = borderPaddingStart
+ (viewport.getBorderAndPaddingWidthEnd() / 1000f);
float bpheight = borderPaddingBefore
+ (viewport.getBorderAndPaddingWidthAfter() / 1000f);
@@ -692,7 +692,7 @@
* @param breakOutList the state stack to restore.
*/
protected abstract void restoreStateStackAfterBreakOut(List breakOutList);
-
+
/**
* Breaks out of the state stack to handle fixed block-containers.
* @return the saved state stack to recreate later
@@ -701,16 +701,16 @@
/** Saves the graphics state of the rendering engine. */
protected abstract void saveGraphicsState();
-
+
/** Restores the last graphics state of the rendering engine. */
protected abstract void restoreGraphicsState();
/** Indicates the beginning of a text object. */
protected abstract void beginTextObject();
-
+
/** Indicates the end of a text object. */
protected abstract void endTextObject();
-
+
/**
* Paints the text decoration marks.
* @param fm Current typeface
@@ -719,10 +719,10 @@
* @param baseline position of the baseline
* @param startx start IPD
*/
- protected void renderTextDecoration(FontMetrics fm, int fontsize, InlineArea inline,
+ protected void renderTextDecoration(FontMetrics fm, int fontsize, InlineArea inline,
int baseline, int startx) {
- boolean hasTextDeco = inline.hasUnderline()
- || inline.hasOverline()
+ boolean hasTextDeco = inline.hasUnderline()
+ || inline.hasOverline()
|| inline.hasLineThrough();
if (hasTextDeco) {
endTextObject();
@@ -733,22 +733,22 @@
if (inline.hasUnderline()) {
Color ct = (Color) inline.getTrait(Trait.UNDERLINE_COLOR);
float y = baseline - descender / 2f;
- drawBorderLine(startx / 1000f, (y - halfLineWidth) / 1000f,
- endx, (y + halfLineWidth) / 1000f,
+ drawBorderLine(startx / 1000f, (y - halfLineWidth) / 1000f,
+ endx, (y + halfLineWidth) / 1000f,
true, true, Constants.EN_SOLID, ct);
}
if (inline.hasOverline()) {
Color ct = (Color) inline.getTrait(Trait.OVERLINE_COLOR);
float y = (float)(baseline - (1.1 * capHeight));
- drawBorderLine(startx / 1000f, (y - halfLineWidth) / 1000f,
- endx, (y + halfLineWidth) / 1000f,
+ drawBorderLine(startx / 1000f, (y - halfLineWidth) / 1000f,
+ endx, (y + halfLineWidth) / 1000f,
true, true, Constants.EN_SOLID, ct);
}
if (inline.hasLineThrough()) {
Color ct = (Color) inline.getTrait(Trait.LINETHROUGH_COLOR);
float y = (float)(baseline - (0.45 * capHeight));
- drawBorderLine(startx / 1000f, (y - halfLineWidth) / 1000f,
- endx, (y + halfLineWidth) / 1000f,
+ drawBorderLine(startx / 1000f, (y - halfLineWidth) / 1000f,
+ endx, (y + halfLineWidth) / 1000f,
true, true, Constants.EN_SOLID, ct);
}
}
@@ -756,7 +756,7 @@
/** Clip using the current path. */
protected abstract void clip();
-
+
/**
* Clip using a rectangular area.
* @param x the x coordinate (in points)
@@ -765,28 +765,28 @@
* @param height the height of the rectangle (in points)
*/
protected abstract void clipRect(float x, float y, float width, float height);
-
+
/**
- * Moves the current point to (x, y), omitting any connecting line segment.
+ * Moves the current point to (x, y), omitting any connecting line segment.
* @param x x coordinate
* @param y y coordinate
*/
protected abstract void moveTo(float x, float y);
-
+
/**
- * Appends a straight line segment from the current point to (x, y). The
- * new current point is (x, y).
+ * Appends a straight line segment from the current point to (x, y). The
+ * new current point is (x, y).
* @param x x coordinate
* @param y y coordinate
*/
protected abstract void lineTo(float x, float y);
-
+
/**
- * Closes the current subpath by appending a straight line segment from
+ * Closes the current subpath by appending a straight line segment from
* the current point to the starting point of the subpath.
*/
protected abstract void closePath();
-
+
/**
* Fill a rectangular area.
* @param x the x coordinate
@@ -802,7 +802,7 @@
* @param fill true to set the fill color, false for the foreground color
*/
protected abstract void updateColor(Color col, boolean fill);
-
+
/**
* Draw an image at the indicated location.
* @param url the URI/URL of the image
@@ -810,7 +810,7 @@
* @param foreignAttributes an optional Map with foreign attributes, may be null
*/
protected abstract void drawImage(String url, Rectangle2D pos, Map foreignAttributes);
-
+
/**
* Draw an image at the indicated location.
* @param url the URI/URL of the image
@@ -819,7 +819,7 @@
protected final void drawImage(String url, Rectangle2D pos) {
drawImage(url, pos, null);
}
-
+
/**
* Draw a border segment of an XSL-FO style border.
* @param x1 starting x coordinate
@@ -827,12 +827,12 @@
* @param x2 ending x coordinate
* @param y2 ending y coordinate
* @param horz true for horizontal border segments, false for vertical border segments
- * @param startOrBefore true for border segments on the start or before edge,
+ * @param startOrBefore true for border segments on the start or before edge,
* false for end or after.
* @param style the border style (one of Constants.EN_DASHED etc.)
* @param col the color for the border segment
*/
- protected abstract void drawBorderLine(float x1, float y1, float x2, float y2,
+ protected abstract void drawBorderLine(float x1, float y1, float x2, float y2,
boolean horz, boolean startOrBefore, int style, Color col);
/** {@inheritDoc} */
@@ -842,5 +842,5 @@
String ns = fo.getNameSpace();
renderDocument(doc, ns, pos, fo.getForeignAttributes());
}
-
+
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* 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.
@@ -75,12 +75,12 @@
* top level processing of the area tree and adds some abstract methods to
* handle viewports. This keeps track of the current block and inline position.
*/
-public abstract class AbstractRenderer
+public abstract class AbstractRenderer
implements Renderer, Constants {
/** logging instance */
protected static Log log = LogFactory.getLog("org.apache.fop.render");
-
+
/**
* user agent
*/
@@ -110,9 +110,9 @@
/** the currently active PageViewport */
protected PageViewport currentPageViewport;
-
+
private Set warnedXMLHandlers;
-
+
/** {@inheritDoc} */
public abstract void setupFontInfo(FontInfo fontInfo);
@@ -153,7 +153,7 @@
}
/**
- * {@inheritDoc}
+ * {@inheritDoc}
*/
public void processOffDocumentItem(OffDocumentItem odi) { }
@@ -161,17 +161,17 @@
public Graphics2DAdapter getGraphics2DAdapter() {
return null;
}
-
+
/** {@inheritDoc} */
public ImageAdapter getImageAdapter() {
return null;
}
-
+
/** @return the current PageViewport or null, if none is active */
protected PageViewport getCurrentPageViewport() {
return this.currentPageViewport;
}
-
+
/** {@inheritDoc} */
public void preparePage(PageViewport page) { }
@@ -212,7 +212,7 @@
public void startPageSequence(LineArea seqTitle) {
//do nothing
}
-
+
/** {@inheritDoc} */
public void startPageSequence(PageSequence pageSequence) {
startPageSequence(pageSequence.getTitle());
@@ -300,7 +300,7 @@
* Establishes a new viewport area.
*
* @param ctm the coordinate transformation matrix to use
- * @param clippingRect the clipping rectangle if the viewport should be clipping,
+ * @param clippingRect the clipping rectangle if the viewport should be clipping,
* null if no clipping is performed.
*/
protected abstract void startVParea(CTM ctm, Rectangle2D clippingRect);
@@ -462,7 +462,7 @@
if (bv.getClip()) {
clippingRect = new Rectangle(saveIP, saveBP, bv.getIPD(), bv.getBPD());
}
-
+
CTM ctm = bv.getCTM();
currentIPPosition = 0;
currentBPPosition = 0;
@@ -495,12 +495,12 @@
* @param block the block area
*/
protected abstract void renderReferenceArea(Block block);
-
+
/**
* Renders a list of block areas.
*
* @param parent the parent block if the parent is a block, otherwise
- * a null value.
+ * a null value.
* @param blocks The block areas
*/
protected void renderBlocks(Block parent, List blocks) {
@@ -517,7 +517,7 @@
currentIPPosition += spaceStart.intValue();
}*/
}
-
+
// the position of the containing block is used for
// absolutely positioned areas
int contBP = currentBPPosition;
@@ -538,8 +538,8 @@
// a line area is rendered from the top left position
// of the line, each inline object is offset from there
LineArea line = (LineArea) obj;
- currentIPPosition = contIP
- + parent.getStartIndent()
+ currentIPPosition = contIP
+ + parent.getStartIndent()
+ line.getStartIndent();
renderLineArea(line);
//InlineArea child = (InlineArea) line.getInlineAreas().get(0);
@@ -637,14 +637,14 @@
}
}
- /**
+ /**
* Common method to render the background and borders for any inline area.
* The all borders and padding are drawn outside the specified area.
* @param area the inline area for which the background, border and padding is to be
* rendered
*/
protected abstract void renderInlineAreaBackAndBorders(InlineArea area);
-
+
/**
* Render the given Space.
* @param space the space to render
@@ -676,7 +676,7 @@
int saveBP = currentBPPosition;
Iterator iter = text.getChildAreas().iterator();
while (iter.hasNext()) {
- renderInlineArea((InlineArea) iter.next());
+ renderInlineArea((InlineArea) iter.next());
}
currentIPPosition = saveIP + text.getAllocIPD();
}
@@ -709,7 +709,7 @@
currentBPPosition += ip.getOffset();
Iterator iter = ip.getChildAreas().iterator();
while (iter.hasNext()) {
- renderInlineArea((InlineArea) iter.next());
+ renderInlineArea((InlineArea) iter.next());
}
currentIPPosition = saveIP + ip.getAllocIPD();
currentBPPosition = saveBP;
@@ -809,7 +809,7 @@
handler.handleXML(ctx, doc, namespace);
} catch (Exception e) {
// could not handle document
- ResourceEventProducer eventProducer
+ ResourceEventProducer eventProducer
= ResourceEventProducer.Provider.get(
ctx.getUserAgent().getEventBroadcaster());
eventProducer.foreignXMLProcessingError(this, doc, namespace, e);
@@ -830,7 +830,7 @@
/**
* Get the MIME type of the renderer.
- *
+ *
* @return The MIME type of the renderer
*/
public String getMimeType() {
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRendererConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRendererConfigurator.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRendererConfigurator.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRendererConfigurator.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* 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.
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRendererMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRendererMaker.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRendererMaker.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRendererMaker.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* 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.
@@ -26,7 +26,7 @@
* about them.
*/
public abstract class AbstractRendererMaker {
-
+
/**
* Instantiates a new renderer.
* @param userAgent the user agent
@@ -38,7 +38,7 @@
* @return Indicates whether this renderer requires an OutputStream to work with.
*/
public abstract boolean needsOutputStream();
-
+
/**
* @return an array of MIME types the renderer supports.
*/
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/DefaultFontResolver.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/DefaultFontResolver.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/DefaultFontResolver.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/DefaultFontResolver.java Thu Jul 24 02:35:34 2008
@@ -30,7 +30,7 @@
public class DefaultFontResolver implements FontResolver {
private FOUserAgent userAgent;
-
+
/**
* Main constructor.
* @param userAgent the user agent
@@ -38,10 +38,10 @@
public DefaultFontResolver(FOUserAgent userAgent) {
this.userAgent = userAgent;
}
-
+
/** {@inheritDoc} */
public Source resolve(String href) {
return userAgent.resolveURI(href, userAgent.getFontBaseURL());
}
-
+
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/Graphics2DAdapter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/Graphics2DAdapter.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/Graphics2DAdapter.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/Graphics2DAdapter.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.render;
import java.io.IOException;
@@ -43,10 +43,10 @@
* @param height height of the image
* @throws IOException In case of an I/O error while writing the output format
*/
- void paintImage(org.apache.xmlgraphics.java2d.Graphics2DImagePainter painter,
+ void paintImage(org.apache.xmlgraphics.java2d.Graphics2DImagePainter painter,
RendererContext context,
int x, int y, int width, int height) throws IOException;
-
+
/**
* Paints an arbitrary images on a given Graphics2D instance. The renderer
* providing this functionality must set up a Graphics2D instance so that
@@ -62,8 +62,8 @@
* @throws IOException In case of an I/O error while writing the output format
* @deprecated Use the variant with the Graphics2DImagePainter from XML Graphics Commons instead
*/
- void paintImage(Graphics2DImagePainter painter,
+ void paintImage(Graphics2DImagePainter painter,
RendererContext context,
int x, int y, int width, int height) throws IOException;
-
+
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/Graphics2DImagePainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/Graphics2DImagePainter.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/Graphics2DImagePainter.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/Graphics2DImagePainter.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.render;
/**
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ImageAdapter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ImageAdapter.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ImageAdapter.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ImageAdapter.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.render;
import java.awt.image.RenderedImage;
@@ -40,8 +40,8 @@
* @param height height of the image
* @throws IOException In case of an I/O error while writing the output format
*/
- void paintImage(RenderedImage image,
+ void paintImage(RenderedImage image,
RendererContext context,
int x, int y, int width, int height) throws IOException;
-
+
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/PrintRendererConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/PrintRendererConfigurator.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/PrintRendererConfigurator.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/PrintRendererConfigurator.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* 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.
@@ -71,7 +71,7 @@
/**
* Builds a list of EmbedFontInfo objects for use with the setup() method.
- *
+ *
* @param renderer print renderer
* @throws FOPException if something's wrong with the config data
*/
@@ -105,7 +105,7 @@
/**
* Builds a list of EmbedFontInfo objects for use with the setup() method.
- *
+ *
* @param cfg Configuration object
* @param fontResolver the FontResolver to use
* @param strict true if an Exception should be thrown if an error is found.
@@ -285,7 +285,7 @@
/**
* Creates a new FontTriplet given a triple Configuration
- *
+ *
* @param tripletCfg a triplet configuration
* @param strict use strict validation
* @return a font triplet font key
@@ -323,7 +323,7 @@
/**
* Returns a font info from a font node Configuration definition
- *
+ *
* @param fontCfg Configuration object (font node)
* @param fontResolver font resolver used to resolve font
* @param strict validate configuration strictly
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/Renderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/Renderer.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/Renderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/Renderer.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* 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.
@@ -54,7 +54,7 @@
/**
* Get the MIME type of the renderer.
- *
+ *
* @return The MIME type of the renderer, may return null if not applicable.
*/
String getMimeType();
@@ -93,7 +93,7 @@
* @return the user agent
*/
FOUserAgent getUserAgent();
-
+
/**
* Set up the given FontInfo.
*
@@ -115,7 +115,7 @@
boolean supportsOutOfOrder();
/**
- * Tells the renderer to process an item not explicitly placed on the
+ * Tells the renderer to process an item not explicitly placed on the
* document (e.g., PDF bookmarks). Note - not all renderers will process
* all off-document items.
*
@@ -127,12 +127,12 @@
* @return the adapter for painting Java2D images (or null if not supported)
*/
Graphics2DAdapter getGraphics2DAdapter();
-
+
/**
* @return the adapter for painting RenderedImages (or null if not supported)
*/
ImageAdapter getImageAdapter();
-
+
/**
* This is called if the renderer supports out of order rendering. The
* renderer should prepare the page so that a page further on in the set of
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/RendererConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/RendererConfigurator.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/RendererConfigurator.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/RendererConfigurator.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* 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.
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/RendererContext.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/RendererContext.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/RendererContext.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/RendererContext.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.render;
//Java
@@ -54,7 +54,7 @@
public AbstractRenderer getRenderer() {
return renderer;
}
-
+
/**
* Returns the MIME type associated with this RendererContext.
*
@@ -121,7 +121,7 @@
/** The wrapped RendererContext */
protected RendererContext context;
-
+
/**
* Main constructor
* @param context the RendererContent instance
@@ -129,7 +129,7 @@
public RendererContextWrapper(RendererContext context) {
this.context = context;
}
-
+
/** @return the user agent */
public FOUserAgent getUserAgent() {
return context.getUserAgent();
@@ -158,7 +158,7 @@
/** @return the foreign attributes */
public Map getForeignAttributes() {
return (Map)context.getProperty(RendererContextConstants.FOREIGN_ATTRIBUTES);
- }
- }
+ }
+ }
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/RendererContextConstants.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/RendererContextConstants.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/RendererContextConstants.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/RendererContextConstants.java Thu Jul 24 02:35:34 2008
@@ -26,10 +26,10 @@
/** The output stream that the document is being sent to. */
String OUTPUT_STREAM = "outputStream";
-
+
/** The current PageViewport being rendered. */
String PAGE_VIEWPORT = "pageViewport";
-
+
/** The target width of the image being painted. */
String WIDTH = "width";
@@ -44,11 +44,11 @@
/** The configuration for the XMLHandler. */
String HANDLER_CONFIGURATION = "cfg";
-
+
/**
- * An optional Map (keys: QName, values: String) with attributes containing additional hints
+ * An optional Map (keys: QName, values: String) with attributes containing additional hints
* for rendering.
*/
String FOREIGN_ATTRIBUTES = "foreign-attributes";
-
+
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/RendererEventProducer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/RendererEventProducer.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/RendererEventProducer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/RendererEventProducer.java Thu Jul 24 02:35:34 2008
@@ -31,7 +31,7 @@
/** Provider class for the event producer. */
class Provider {
-
+
/**
* Returns an event producer.
* @param broadcaster the event broadcaster to use
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/RendererFactory.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/RendererFactory.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/RendererFactory.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/RendererFactory.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.render;
import java.io.OutputStream;
@@ -39,14 +39,14 @@
* Factory for FOEventHandlers and Renderers.
*/
public class RendererFactory {
-
+
/** the logger */
private static Log log = LogFactory.getLog(RendererFactory.class);
private Map rendererMakerMapping = new java.util.HashMap();
private Map eventHandlerMakerMapping = new java.util.HashMap();
-
-
+
+
/**
* Main constructor.
*/
@@ -54,7 +54,7 @@
discoverRenderers();
discoverFOEventHandlers();
}
-
+
/**
* Add a new RendererMaker. If another maker has already been registered for a
* particular MIME type, this call overwrites the existing one.
@@ -65,13 +65,13 @@
for (int i = 0; i < mimes.length; i++) {
//This overrides any renderer previously set for a MIME type
if (rendererMakerMapping.get(mimes[i]) != null) {
- log.trace("Overriding renderer for " + mimes[i]
+ log.trace("Overriding renderer for " + mimes[i]
+ " with " + maker.getClass().getName());
}
rendererMakerMapping.put(mimes[i], maker);
}
}
-
+
/**
* Add a new FOEventHandlerMaker. If another maker has already been registered for a
* particular MIME type, this call overwrites the existing one.
@@ -82,13 +82,13 @@
for (int i = 0; i < mimes.length; i++) {
//This overrides any event handler previously set for a MIME type
if (eventHandlerMakerMapping.get(mimes[i]) != null) {
- log.trace("Overriding FOEventHandler for " + mimes[i]
+ log.trace("Overriding FOEventHandler for " + mimes[i]
+ " with " + maker.getClass().getName());
}
eventHandlerMakerMapping.put(mimes[i], maker);
}
}
-
+
/**
* Add a new RendererMaker. If another maker has already been registered for a
* particular MIME type, this call overwrites the existing one.
@@ -114,7 +114,7 @@
+ AbstractRendererMaker.class.getName());
}
}
-
+
/**
* Add a new FOEventHandlerMaker. If another maker has already been registered for a
* particular MIME type, this call overwrites the existing one.
@@ -140,7 +140,7 @@
+ AbstractFOEventHandlerMaker.class.getName());
}
}
-
+
/**
* Returns a RendererMaker which handles the given MIME type.
* @param mime the requested output format
@@ -151,7 +151,7 @@
= (AbstractRendererMaker)rendererMakerMapping.get(mime);
return maker;
}
-
+
/**
* Returns a FOEventHandlerMaker which handles the given MIME type.
* @param mime the requested output format
@@ -162,7 +162,7 @@
= (AbstractFOEventHandlerMaker)eventHandlerMakerMapping.get(mime);
return maker;
}
-
+
/**
* Creates a Renderer object based on render-type desired
* @param userAgent the user agent for access to configuration
@@ -170,7 +170,7 @@
* @return the new Renderer instance
* @throws FOPException if the renderer cannot be properly constructed
*/
- public Renderer createRenderer(FOUserAgent userAgent, String outputFormat)
+ public Renderer createRenderer(FOUserAgent userAgent, String outputFormat)
throws FOPException {
if (userAgent.getRendererOverride() != null) {
return userAgent.getRendererOverride();
@@ -189,8 +189,8 @@
return rend;
}
}
-
-
+
+
/**
* Creates FOEventHandler instances based on the desired output.
* @param userAgent the user agent for access to configuration
@@ -199,7 +199,7 @@
* @return the newly constructed FOEventHandler
* @throws FOPException if the FOEventHandler cannot be properly constructed
*/
- public FOEventHandler createFOEventHandler(FOUserAgent userAgent,
+ public FOEventHandler createFOEventHandler(FOUserAgent userAgent,
String outputFormat, OutputStream out) throws FOPException {
if (userAgent.getFOEventHandlerOverride() != null) {
@@ -214,8 +214,8 @@
+ " Neither an FOEventHandler, nor a Renderer could be found"
+ " for this output format.");
} else {
- if (out == null
- && userAgent.getRendererOverride() == null
+ if (out == null
+ && userAgent.getRendererOverride() == null
&& rendMaker.needsOutputStream()) {
throw new FOPException(
"OutputStream has not been set");
@@ -228,7 +228,7 @@
}
}
}
-
+
/**
* @return an array of all supported MIME types
*/
@@ -245,7 +245,7 @@
Collections.sort(lst);
return (String[])lst.toArray(new String[lst.size()]);
}
-
+
/**
* Discovers Renderer implementations through the classpath and dynamically
* registers them.
@@ -259,7 +259,7 @@
AbstractRendererMaker maker = (AbstractRendererMaker)providers.next();
try {
if (log.isDebugEnabled()) {
- log.debug("Dynamically adding maker for Renderer: "
+ log.debug("Dynamically adding maker for Renderer: "
+ maker.getClass().getName());
}
addRendererMaker(maker);
@@ -270,7 +270,7 @@
}
}
}
-
+
/**
* Discovers FOEventHandler implementations through the classpath and dynamically
* registers them.
@@ -284,7 +284,7 @@
AbstractFOEventHandlerMaker maker = (AbstractFOEventHandlerMaker)providers.next();
try {
if (log.isDebugEnabled()) {
- log.debug("Dynamically adding maker for FOEventHandler: "
+ log.debug("Dynamically adding maker for FOEventHandler: "
+ maker.getClass().getName());
}
addFOEventHandlerMaker(maker);
@@ -295,5 +295,5 @@
}
}
}
-
+
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/XMLHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/XMLHandler.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/XMLHandler.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/XMLHandler.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.render;
import org.w3c.dom.Document;
@@ -46,9 +46,9 @@
* @param ns The Namespace of the foreign object
* @exception Exception If an error occurs during processing.
*/
- void handleXML(RendererContext context,
+ void handleXML(RendererContext context,
Document doc, String ns) throws Exception;
-
+
/**
* Checks if this XMLHandler supports handling an XML namespace for a particular renderer.
* @param renderer the renderer for which to check.
@@ -57,7 +57,7 @@
boolean supportsRenderer(Renderer renderer);
/**
- * @return the XML namespace for the XML dialect this XMLHandler supports,
+ * @return the XML namespace for the XML dialect this XMLHandler supports,
* null if all XML content is handled by this instance.
*/
String getNamespace();
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/XMLHandlerConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/XMLHandlerConfigurator.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/XMLHandlerConfigurator.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/XMLHandlerConfigurator.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* 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.
@@ -27,13 +27,13 @@
import org.apache.fop.apps.FOUserAgent;
/**
- * Configurator for XMLHandler objects.
+ * Configurator for XMLHandler objects.
*/
public class XMLHandlerConfigurator extends AbstractRendererConfigurator {
/** logger instance */
protected static Log log = LogFactory.getLog(XMLHandlerConfigurator.class);
-
+
/**
* Default constructor
* @param userAgent the user agent
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/XMLHandlerRegistry.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/XMLHandlerRegistry.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/XMLHandlerRegistry.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/XMLHandlerRegistry.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* 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.
@@ -37,17 +37,17 @@
/** the logger */
private static Log log = LogFactory.getLog(XMLHandlerRegistry.class);
-
+
/** Map containing XML handlers for various document types */
private Map handlers = new java.util.HashMap();
-
+
/**
* Default constructor.
*/
public XMLHandlerRegistry() {
discoverXMLHandlers();
}
-
+
/**
* Add a default XML handler which is able to handle any namespace.
* @param handler XMLHandler to use
@@ -55,7 +55,7 @@
private void setDefaultXMLHandler(XMLHandler handler) {
addXMLHandler(XMLHandler.HANDLE_ALL, handler);
}
-
+
/**
* Add an XML handler. The handler itself is inspected to find out what it supports.
* @param classname the fully qualified class name
@@ -75,11 +75,11 @@
+ classname);
} catch (ClassCastException e) {
throw new IllegalArgumentException(classname
- + " is not an "
+ + " is not an "
+ XMLHandler.class.getName());
}
}
-
+
/**
* Add an XML handler. The handler itself is inspected to find out what it supports.
* @param handler the XMLHandler instance
@@ -92,7 +92,7 @@
addXMLHandler(ns, handler);
}
}
-
+
/**
* Add an XML handler for the given MIME type and XML namespace.
* @param ns Namespace URI
@@ -107,7 +107,7 @@
}
lst.add(handler);
}
-
+
/**
* Returns an XMLHandler which handles an XML dialect of the given namespace and for
* a specified output format defined by its MIME type.
@@ -140,7 +140,7 @@
}
return null; //No handler found
}
-
+
/**
* Discovers XMLHandler implementations through the classpath and dynamically
* registers them.
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPEventProducer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPEventProducer.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPEventProducer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPEventProducer.java Thu Jul 24 02:35:34 2008
@@ -31,7 +31,7 @@
/** Provider class for the event producer. */
class Provider {
-
+
/**
* Returns an event producer.
* @param broadcaster the event broadcaster to use
@@ -50,14 +50,14 @@
public EventModel createEventModel() {
return loadModel(getClass(), "event-model.xml");
}
-
+
}
-
+
/**
* Warn about using default font setup.
* @param source the event source
* @event.severity WARN
*/
void warnDefaultFontSetup(Object source);
-
+
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPGraphics2DAdapter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPGraphics2DAdapter.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPGraphics2DAdapter.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPGraphics2DAdapter.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.render.afp;
import java.awt.image.BufferedImage;
@@ -37,9 +37,9 @@
*/
public AFPGraphics2DAdapter() {
}
-
+
/** {@inheritDoc} */
- public void paintImage(Graphics2DImagePainter painter,
+ public void paintImage(Graphics2DImagePainter painter,
RendererContext context,
int x, int y, int width, int height) throws IOException {
RendererContext.RendererContextWrapper wrappedContext
@@ -47,7 +47,7 @@
AFPRenderer afp = (AFPRenderer)context.getRenderer();
Boolean grayObj = (Boolean)context.getProperty(AFPRendererContextConstants.AFP_GRAYSCALE);
boolean gray = (grayObj != null ? grayObj.booleanValue() : false);
-
+
//Paint to a BufferedImage
int resolution = (int)Math.round(context.getUserAgent().getTargetResolution());
BufferedImage bi = paintToBufferedImage(painter, wrappedContext, resolution, gray, false);
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRenderer.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRenderer.java Thu Jul 24 02:35:34 2008
@@ -544,8 +544,8 @@
/** {@inheritDoc} */
protected void renderReferenceArea(Block block) {
- //TODO Remove this method once concatenateTransformationMatrix() is implemented
-
+ //TODO Remove this method once concatenateTransformationMatrix() is implemented
+
// save position and offset
int saveIP = currentIPPosition;
int saveBP = currentBPPosition;
@@ -555,7 +555,7 @@
at.translate(currentIPPosition, currentBPPosition);
at.translate(block.getXOffset(), block.getYOffset());
at.translate(0, block.getSpaceBefore());
-
+
if (!at.isIdentity()) {
Rectangle2D contentRect
= new Rectangle2D.Double(at.getTranslateX(), at.getTranslateY(),
@@ -575,12 +575,12 @@
if (!at.isIdentity()) {
popViewPortPos();
}
-
+
// stacked and relative blocks effect stacking
currentIPPosition = saveIP;
currentBPPosition = saveBP;
}
-
+
/** {@inheritDoc} */
protected void renderFlow(NormalFlow flow) {
// save position and offset
@@ -590,7 +590,7 @@
//Establish a new coordinate system
AffineTransform at = new AffineTransform();
at.translate(currentIPPosition, currentBPPosition);
-
+
if (!at.isIdentity()) {
Rectangle2D contentRect
= new Rectangle2D.Double(at.getTranslateX(), at.getTranslateY(),
@@ -601,17 +601,17 @@
currentIPPosition = 0;
currentBPPosition = 0;
super.renderFlow(flow);
-
+
if (!at.isIdentity()) {
popViewPortPos();
}
-
+
// stacked and relative blocks effect stacking
currentIPPosition = saveIP;
currentBPPosition = saveBP;
}
-
-
+
+
/** {@inheritDoc} */
protected void concatenateTransformationMatrix(AffineTransform at) {
//Not used here since AFPRenderer defines its own renderBlockViewport() method.
@@ -1077,7 +1077,7 @@
* } else if (MimeConstants.MIME_JPEG.equals(mime)) { if
* (!fopimage.load(FopImage.ORIGINAL_DATA)) { return; }
* fact.releaseImage(url, userAgent);
- *
+ *
* int x = mpts2units(pos.getX() + currentIPPosition); int y =
* mpts2units(pos.getY() + currentBPPosition); int w =
* mpts2units(pos.getWidth()); int h =
@@ -1165,7 +1165,7 @@
/**
* Writes a RenderedImage to an OutputStream as raw sRGB bitmaps.
- *
+ *
* @param image
* the RenderedImage
* @param out
@@ -1180,7 +1180,7 @@
/**
* Draws a BufferedImage to AFP.
- *
+ *
* @param image
* the RenderedImage
* @param imageResolution
@@ -1486,7 +1486,7 @@
/**
* Sets the rotation to be used for portrait pages, valid values are 0
* (default), 90, 180, 270.
- *
+ *
* @param rotation
* The rotation in degrees.
*/
@@ -1508,7 +1508,7 @@
/**
* Sets the rotation to be used for landsacpe pages, valid values are 0, 90,
* 180, 270 (default).
- *
+ *
* @param rotation
* The rotation in degrees.
*/
@@ -1528,7 +1528,7 @@
/**
* Get the MIME type of the renderer.
- *
+ *
* @return The MIME type of the renderer
*/
public String getMimeType() {
@@ -1538,7 +1538,7 @@
/**
* Method to render the page extension.
* <p>
- *
+ *
* @param pageViewport the page object
*/
private void renderPageObjectExtensions(PageViewport pageViewport) {
@@ -1605,7 +1605,7 @@
/**
* Converts FOP mpt measurement to afp measurement units
- *
+ *
* @param mpt
* the millipoints value
* @return afp measurement unit value
@@ -1617,7 +1617,7 @@
/**
* Converts a byte array containing 24 bit RGB image data to a grayscale
* image.
- *
+ *
* @param io
* the target image object
* @param raw
@@ -1792,7 +1792,7 @@
/**
* Sets the number of bits used per pixel
- *
+ *
* @param bitsPerPixel
* number of bits per pixel
*/
@@ -1812,7 +1812,7 @@
/**
* Sets whether images are color or not
- *
+ *
* @param colorImages
* color image output
*/
@@ -1822,7 +1822,7 @@
/**
* Sets the output/device resolution
- *
+ *
* @param resolution
* the output resolution (dpi)
*/
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* 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.
@@ -38,10 +38,10 @@
import org.apache.fop.util.LogUtil;
/**
- * AFP Renderer configurator
+ * AFP Renderer configurator
*/
public class AFPRendererConfigurator extends PrintRendererConfigurator {
-
+
/**
* Default constructor
* @param userAgent user agent
@@ -181,7 +181,7 @@
}
return null;
}
-
+
/**
* Builds a list of AFPFontInfo objects for use with the setup() method.
* @param cfg Configuration object
@@ -229,14 +229,14 @@
LogUtil.handleException(log, e,
userAgent.getFactory().validateUserConfigStrictly());
}
-
+
Configuration imagesCfg = cfg.getChild("images");
if (!"color".equalsIgnoreCase(imagesCfg.getAttribute("mode", "b+w"))) {
afpRenderer.setBitsPerPixel(imagesCfg.getAttributeAsInteger("bits-per-pixel", 8));
} else {
afpRenderer.setColorImages(true);
}
-
+
Configuration rendererResolutionCfg = cfg.getChild("renderer-resolution", false);
if (rendererResolutionCfg != null) {
afpRenderer.setResolution(rendererResolutionCfg.getValueAsInteger(240));
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRendererContextConstants.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRendererContextConstants.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRendererContextConstants.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRendererContextConstants.java Thu Jul 24 02:35:34 2008
@@ -27,7 +27,7 @@
public interface AFPRendererContextConstants extends RendererContextConstants {
/**
- * Key for a Boolean value that enables grayscale processing instead of color
+ * Key for a Boolean value that enables grayscale processing instead of color
* processing.
*/
String AFP_GRAYSCALE = "afpGrayscale";
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPSVGHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPSVGHandler.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPSVGHandler.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPSVGHandler.java Thu Jul 24 02:35:34 2008
@@ -5,9 +5,9 @@
* 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.
@@ -35,13 +35,13 @@
public boolean supportsRenderer(Renderer renderer) {
return (renderer instanceof AFPRenderer);
}
-
+
/** {@inheritDoc} */
protected void updateRendererContext(RendererContext context) {
//Work around a problem in Batik: Gradients cannot be done in ColorSpace.CS_GRAY
context.setProperty(AFPRendererContextConstants.AFP_GRAYSCALE,
Boolean.FALSE);
}
-
+
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/exceptions/NestedRuntimeException.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/exceptions/NestedRuntimeException.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/exceptions/NestedRuntimeException.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/exceptions/NestedRuntimeException.java Thu Jul 24 02:35:34 2008
@@ -30,10 +30,10 @@
*
*/
public abstract class NestedRuntimeException extends RuntimeException {
-
+
/** Root cause of this nested exception */
private Throwable underlyingException;
-
+
/**
* Construct a <code>NestedRuntimeException</code> with the specified detail message.
* @param msg The detail message.
@@ -41,7 +41,7 @@
public NestedRuntimeException(String msg) {
super(msg);
}
-
+
/**
* Construct a <code>NestedRuntimeException</code> with the specified
* detail message and nested exception.
@@ -51,26 +51,26 @@
public NestedRuntimeException(String msg, Throwable t) {
super(msg);
underlyingException = t;
-
+
}
-
+
/**
* Gets the original triggering exception
* @return The original exception as a throwable.
*/
public Throwable getUnderlyingException() {
-
+
return underlyingException;
-
+
}
-
+
/**
* Return the detail message, including the message from the nested
* exception if there is one.
* @return The detail message.
*/
public String getMessage() {
-
+
if (underlyingException == null) {
return super.getMessage();
} else {
@@ -78,9 +78,9 @@
+ "; nested exception is "
+ underlyingException.getClass().getName();
}
-
+
}
-
+
/**
* Print the composite message and the embedded stack trace to the specified stream.
* @param ps the print stream
@@ -93,7 +93,7 @@
underlyingException.printStackTrace(ps);
}
}
-
+
/**
* Print the composite message and the embedded stack trace to the specified writer.
* @param pw the print writer
@@ -106,5 +106,5 @@
underlyingException.printStackTrace(pw);
}
}
-
+
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/exceptions/RendererRuntimeException.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/exceptions/RendererRuntimeException.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/exceptions/RendererRuntimeException.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/exceptions/RendererRuntimeException.java Thu Jul 24 02:35:34 2008
@@ -24,7 +24,7 @@
* <p/>
*/
public class RendererRuntimeException extends NestedRuntimeException {
-
+
/**
* Constructs a RendererRuntimeException with the specified message.
* @param msg the exception mesaage
@@ -32,7 +32,7 @@
public RendererRuntimeException(String msg) {
super(msg);
}
-
+
/**
* Constructs a RendererRuntimeException with the specified message
* wrapping the underlying exception.
@@ -42,5 +42,5 @@
public RendererRuntimeException(String msg, Throwable t) {
super(msg, t);
}
-
+
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPExtensionHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPExtensionHandler.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPExtensionHandler.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPExtensionHandler.java Thu Jul 24 02:35:34 2008
@@ -30,7 +30,7 @@
/**
* ContentHandler (parser) for restoring AFPExtension objects from XML.
*/
-public class AFPExtensionHandler extends DefaultHandler
+public class AFPExtensionHandler extends DefaultHandler
implements ContentHandlerFactory.ObjectSource {
/** Logger instance */
@@ -38,12 +38,12 @@
private StringBuffer content = new StringBuffer();
private Attributes lastAttributes;
-
+
private AFPPageSetup returnedObject;
private ObjectBuiltListener listener;
-
+
/** {@inheritDoc} */
- public void startElement(String uri, String localName, String qName, Attributes attributes)
+ public void startElement(String uri, String localName, String qName, Attributes attributes)
throws SAXException {
boolean handled = false;
if (AFPPageSetup.CATEGORY.equals(uri)) {
@@ -62,10 +62,10 @@
}
if (!handled) {
if (AFPPageSetup.CATEGORY.equals(uri)) {
- throw new SAXException("Unhandled element " + localName
+ throw new SAXException("Unhandled element " + localName
+ " in namespace: " + uri);
} else {
- log.warn("Unhandled element " + localName
+ log.warn("Unhandled element " + localName
+ " in namespace: " + uri);
}
}
@@ -87,7 +87,7 @@
returnedObject.setContent(content.toString());
content.setLength(0); //Reset text buffer (see characters())
}
- }
+ }
}
/** {@inheritDoc} */
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPExtensionHandlerFactory.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPExtensionHandlerFactory.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPExtensionHandlerFactory.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/extensions/AFPExtensionHandlerFactory.java Thu Jul 24 02:35:34 2008
@@ -28,7 +28,7 @@
public class AFPExtensionHandlerFactory implements ContentHandlerFactory {
private static final String[] NAMESPACES = new String[] {AFPPageSetup.CATEGORY};
-
+
/** {@inheritDoc} */
public String[] getSupportedNamespaces() {
return NAMESPACES;
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org