diff options
author | Andreas L. Delmelle <adelmelle@apache.org> | 2007-07-08 19:47:53 +0000 |
---|---|---|
committer | Andreas L. Delmelle <adelmelle@apache.org> | 2007-07-08 19:47:53 +0000 |
commit | 4515d08e19641be91e14c4532aa84d3868ef33ff (patch) | |
tree | 6a0182b09677f10f8d3d09c66f0e807d1b69abbd /src/java/org/apache/fop/image | |
parent | 50505cd29cf2acf34df427f9048a36337e8f1304 (diff) | |
download | xmlgraphics-fop-4515d08e19641be91e14c4532aa84d3868ef33ff.tar.gz xmlgraphics-fop-4515d08e19641be91e14c4532aa84d3868ef33ff.zip |
Bugzilla 42785: Support alignment-adjust for images (submitted by Max Berger)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@554423 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/image')
-rw-r--r-- | src/java/org/apache/fop/image/AbstractFopImage.java | 6 | ||||
-rw-r--r-- | src/java/org/apache/fop/image/FopImage.java | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/image/AbstractFopImage.java b/src/java/org/apache/fop/image/AbstractFopImage.java index 4d49034a7..97f176712 100644 --- a/src/java/org/apache/fop/image/AbstractFopImage.java +++ b/src/java/org/apache/fop/image/AbstractFopImage.java @@ -29,6 +29,7 @@ import java.awt.Color; import org.apache.commons.io.IOUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.apache.fop.datatypes.Length; /** * Base class to implement the FopImage interface. @@ -257,6 +258,11 @@ public abstract class AbstractFopImage implements FopImage { public int getIntrinsicHeight() { return (int)(getHeight() * 72000 / getVerticalResolution()); } + + /** @see org.apache.fop.image.FopImage#getIntrinsicAlignmentAdjust() */ + public Length getIntrinsicAlignmentAdjust() { + return this.imageInfo.alignmentAdjust; + } /** @see org.apache.fop.image.FopImage#getHorizontalResolution() */ public double getHorizontalResolution() { diff --git a/src/java/org/apache/fop/image/FopImage.java b/src/java/org/apache/fop/image/FopImage.java index 0db6a95a0..30f3c8258 100644 --- a/src/java/org/apache/fop/image/FopImage.java +++ b/src/java/org/apache/fop/image/FopImage.java @@ -24,6 +24,8 @@ import java.awt.color.ColorSpace; import java.awt.color.ICC_Profile; import java.awt.Color; +import org.apache.fop.datatypes.Length; + /** * Fop image interface for loading images. * @@ -90,6 +92,12 @@ public interface FopImage { int getIntrinsicHeight(); /** + * @return the intrinsic alignment-adjust value or NULL if the image does + * not have one. + */ + Length getIntrinsicAlignmentAdjust(); + + /** * @return the horizontal bitmap resolution (in dpi) */ double getHorizontalResolution(); @@ -193,6 +201,8 @@ public interface FopImage { public String mimeType; /** implementation-specific String (ex. the namespace for XML-based images) */ public String str; + /** intrinsic alignment-adjust or null if there is none */ + public Length alignmentAdjust; } } |