Browse Source

Switching to the Commons variants for the Graphics2D base/helper classes.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@391742 13f79535-47bb-0310-9956-ffa450edef68
pull/35/head
Jeremias Maerki 18 years ago
parent
commit
9abc2ee3e5

+ 1
- 4
src/java/org/apache/fop/render/pdf/PDFGraphics2DAdapter.java View File

import java.awt.geom.Rectangle2D; import java.awt.geom.Rectangle2D;
import java.io.IOException; import java.io.IOException;
import org.apache.batik.bridge.ViewBox;
import org.apache.fop.render.Graphics2DAdapter; import org.apache.fop.render.Graphics2DAdapter;
import org.apache.fop.render.Graphics2DImagePainter; import org.apache.fop.render.Graphics2DImagePainter;
import org.apache.fop.render.RendererContext; import org.apache.fop.render.RendererContext;
import org.apache.fop.svg.PDFGraphics2D; import org.apache.fop.svg.PDFGraphics2D;
import org.w3c.dom.svg.SVGDocument;
import org.w3c.dom.svg.SVGSVGElement;
/** /**
* Graphics2DAdapter implementation for PDF. * Graphics2DAdapter implementation for PDF.
pdfInfo.pdfContext, pdfInfo.pdfPage.referencePDF(), pdfInfo.pdfContext, pdfInfo.pdfPage.referencePDF(),
renderer.currentFontName, renderer.currentFontName,
renderer.currentFontSize); renderer.currentFontSize);
graphics.setGraphicContext(new org.apache.batik.ext.awt.g2d.GraphicContext());
graphics.setGraphicContext(new org.apache.xmlgraphics.java2d.GraphicContext());
AffineTransform transform = new AffineTransform(); AffineTransform transform = new AffineTransform();
transform.translate(fx, fy); transform.translate(fx, fy);

+ 1
- 1
src/java/org/apache/fop/render/pdf/PDFSVGHandler.java View File

pdfInfo.pdfDoc, pdfInfo.pdfDoc,
pdfInfo.pdfContext, pdfInfo.pdfPage.referencePDF(), pdfInfo.pdfContext, pdfInfo.pdfPage.referencePDF(),
pdfInfo.currentFontName, pdfInfo.currentFontSize); pdfInfo.currentFontName, pdfInfo.currentFontSize);
graphics.setGraphicContext(new org.apache.batik.ext.awt.g2d.GraphicContext());
graphics.setGraphicContext(new org.apache.xmlgraphics.java2d.GraphicContext());
pdfInfo.pdfState.push(); pdfInfo.pdfState.push();
AffineTransform transform = new AffineTransform(); AffineTransform transform = new AffineTransform();
// scale to viewbox // scale to viewbox

+ 3
- 2
src/java/org/apache/fop/svg/PDFGraphics2D.java View File

import org.apache.fop.fonts.CIDFont; import org.apache.fop.fonts.CIDFont;
import org.apache.fop.render.pdf.FopPDFImage; import org.apache.fop.render.pdf.FopPDFImage;


import org.apache.batik.ext.awt.g2d.AbstractGraphics2D;
import org.apache.batik.ext.awt.g2d.GraphicContext;
import org.apache.xmlgraphics.java2d.AbstractGraphics2D;
import org.apache.xmlgraphics.java2d.GraphicContext;

import org.apache.batik.ext.awt.RadialGradientPaint; import org.apache.batik.ext.awt.RadialGradientPaint;
import org.apache.batik.ext.awt.LinearGradientPaint; import org.apache.batik.ext.awt.LinearGradientPaint;
import org.apache.batik.ext.awt.MultipleGradientPaint; import org.apache.batik.ext.awt.MultipleGradientPaint;

+ 1
- 1
src/java/org/apache/fop/svg/PDFTranscoder.java View File

((Color)hints.get(ImageTranscoder.KEY_BACKGROUND_COLOR)); ((Color)hints.get(ImageTranscoder.KEY_BACKGROUND_COLOR));
} }
graphics.setGraphicContext graphics.setGraphicContext
(new org.apache.batik.ext.awt.g2d.GraphicContext());
(new org.apache.xmlgraphics.java2d.GraphicContext());
graphics.preparePainting(); graphics.preparePainting();


graphics.transform(curTxf); graphics.transform(curTxf);

Loading…
Cancel
Save