diff options
author | Peter Hancock <phancock@apache.org> | 2011-11-01 12:20:21 +0000 |
---|---|---|
committer | Peter Hancock <phancock@apache.org> | 2011-11-01 12:20:21 +0000 |
commit | fd263a114c84c3756ead9c16b8b088531c5cab2c (patch) | |
tree | 4cd6ba7c8fe3a144629477ac911b2651707bdb03 /src/java/org/apache/fop/render/afp/AFPSVGHandler.java | |
parent | 54a4751b616ab4e8957b97af4088bd725367ea6f (diff) | |
download | xmlgraphics-fop-fd263a114c84c3756ead9c16b8b088531c5cab2c.tar.gz xmlgraphics-fop-fd263a114c84c3756ead9c16b8b088531c5cab2c.zip |
Bugzilla#52089: Allow JPEG images to be embedded in an AFP document as
is, without being decoded and encoded. It also allows lossy JPEG compression.
Patch by Jeremias Maerki and Mehdi Houshmand.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1195952 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/afp/AFPSVGHandler.java')
-rw-r--r-- | src/java/org/apache/fop/render/afp/AFPSVGHandler.java | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/java/org/apache/fop/render/afp/AFPSVGHandler.java b/src/java/org/apache/fop/render/afp/AFPSVGHandler.java index 7ade64006..48b82bbf3 100644 --- a/src/java/org/apache/fop/render/afp/AFPSVGHandler.java +++ b/src/java/org/apache/fop/render/afp/AFPSVGHandler.java @@ -154,23 +154,18 @@ public class AFPSVGHandler extends AbstractGenericSVGHandler { private AFPObjectAreaInfo createObjectAreaInfo(AFPPaintingState paintingState, int x, int y, int width, int height, int resolution) { // set the data object parameters - AFPObjectAreaInfo objectAreaInfo = new AFPObjectAreaInfo(); AffineTransform at = paintingState.getData().getTransform(); at.translate(x, y); - objectAreaInfo.setX((int)Math.round(at.getTranslateX())); - objectAreaInfo.setY((int)Math.round(at.getTranslateY())); - - objectAreaInfo.setWidthRes(resolution); - objectAreaInfo.setHeightRes(resolution); - AFPUnitConverter unitConv = paintingState.getUnitConverter(); - objectAreaInfo.setWidth(Math.round(unitConv.mpt2units(width))); - objectAreaInfo.setHeight(Math.round(unitConv.mpt2units(height))); int rotation = paintingState.getRotation(); - objectAreaInfo.setRotation(rotation); - + int objX = (int) Math.round(at.getTranslateX()); + int objY = (int) Math.round(at.getTranslateY()); + int objWidth = Math.round(unitConv.mpt2units(width)); + int objHeight = Math.round(unitConv.mpt2units(height)); + AFPObjectAreaInfo objectAreaInfo = new AFPObjectAreaInfo(objX, objY, objWidth, objHeight, + resolution, rotation); return objectAreaInfo; } |