git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@391742 13f79535-47bb-0310-9956-ffa450edef68pull/35/head
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); |
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 |
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; |
((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); |