aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/properties/LengthProperty.java
diff options
context:
space:
mode:
authorAndreas L. Delmelle <adelmelle@apache.org>2008-02-02 22:18:30 +0000
committerAndreas L. Delmelle <adelmelle@apache.org>2008-02-02 22:18:30 +0000
commit8e49549a9f59b5ee87a1c060fa9801916adf153d (patch)
tree122f195dc47b26192d1dd93aeac6a8d667ef7966 /src/java/org/apache/fop/fo/properties/LengthProperty.java
parent9ed3838a87bc617a7119df4eee47ea6f6f27bc19 (diff)
downloadxmlgraphics-fop-8e49549a9f59b5ee87a1c060fa9801916adf153d.tar.gz
xmlgraphics-fop-8e49549a9f59b5ee87a1c060fa9801916adf153d.zip
Slight correction for pixel-values: pass the ratio of pixels-per-point into FixedLength.getInstance()
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@617909 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/properties/LengthProperty.java')
-rw-r--r--src/java/org/apache/fop/fo/properties/LengthProperty.java24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/java/org/apache/fop/fo/properties/LengthProperty.java b/src/java/org/apache/fop/fo/properties/LengthProperty.java
index 7e7b37e06..495e8d8ea 100644
--- a/src/java/org/apache/fop/fo/properties/LengthProperty.java
+++ b/src/java/org/apache/fop/fo/properties/LengthProperty.java
@@ -45,9 +45,7 @@ public abstract class LengthProperty extends Property
super(propId);
}
- /**
- * {@inheritDoc}
- */
+ /** {@inheritDoc} */
public Property convertProperty(Property p,
PropertyList propertyList,
FObj fo) throws PropertyException {
@@ -59,7 +57,9 @@ public abstract class LengthProperty extends Property
}
if (p instanceof NumberProperty) {
//Assume pixels (like in HTML) when there's no unit
- return FixedLength.getInstance(p.getNumeric().getNumericValue(), "px");
+ return FixedLength.getInstance(
+ p.getNumeric().getNumericValue(), "px",
+ propertyList.getFObj().getUserAgent().getSourceResolution() / 72.0f);
}
Length val = p.getLength();
if (val != null) {
@@ -87,30 +87,22 @@ public abstract class LengthProperty extends Property
return 0.0;
}
- /**
- * @return the numeric dimension. Length always a dimension of 1.
- */
+ /** @return the numeric dimension. Length always a dimension of 1 */
public int getDimension() {
return 1;
}
- /**
- * @return this.length cast as a Numeric
- */
+ /** @return this.length cast as a Numeric */
public Numeric getNumeric() {
return this;
}
- /**
- * @return this.length
- */
+ /** @return this.length */
public Length getLength() {
return this;
}
- /**
- * @return this.length cast as an Object
- */
+ /** @return this.length cast as an Object */
public Object getObject() {
return this;
}