Revision: 7419
Author: victormote
Date: 2006-06-05 13:20:23 -0700 (Mon, 05 Jun 2006)
ViewCVS: http://svn.sourceforge.net/foray/?rev=7419&view=rev
Log Message:
-----------
Roll up some no-longer-needed methods.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObjScaled.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObjScaled.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObjScaled.java 2006-06-05 20:15:58 UTC (rev 7418)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObjScaled.java 2006-06-05 20:20:23 UTC (rev 7419)
@@ -41,38 +41,6 @@
}
/**
- * @param parentAreaCR_IPD Per XSL-FO Std 1.0, Section 7.14.5, "the
- * corresponding dimension of the closest area ancestor that was generated
- * by a block-level formatting object." This is needed in order to compute
- * the inline-progression-dimension, which is needed when content-width is
- * scale-to-fit.
- * @return The width, in millipoints, of the reference-area containing
- * the content.
- */
- public int traitContentWidth(int parentAreaCR_IPD) {
- int viewportWidth = this.traitIPDimensionOpt(parentAreaCR_IPD);
- float scalingFactor = this.getContentWidth(
- this.intrinsicContentWidth(), viewportWidth);
- return (int) (this.intrinsicContentWidth() * scalingFactor);
- }
-
- /**
- * @param parentAreaCR_BPD Per XSL-FO Std 1.0, Section 7.14.1, "the
- * corresponding dimension of the closest area ancestor that was generated
- * by a block-level formatting object." This is needed in order to compute
- * the block-progression-dimension, which is needed when content-height is
- * scale-to-fit.
- * @return The height, in millipoints, of the reference-area containing
- * the content.
- */
- public int traitContentHeight(int parentAreaCR_BPD) {
- int viewportHeight = this.traitBPDimensionOpt(parentAreaCR_BPD);
- float scalingFactor = this.getContentHeight(
- this.intrinsicContentHeight(), viewportHeight);
- return (int) (this.intrinsicContentHeight() * scalingFactor);
- }
-
- /**
* @return The width, in millipoints, of the content of this object, as
* reported by the content itself.
*/
@@ -96,7 +64,9 @@
if (viewportIPD != Constants.DIMENSION_AUTO) {
return viewportIPD;
}
- return traitContentWidth(parentAreaCR_IPD);
+ float scalingFactor = this.getContentWidth(
+ this.intrinsicContentWidth(), viewportIPD);
+ return (int) (this.intrinsicContentWidth() * scalingFactor);
}
/**
@@ -111,7 +81,9 @@
if (viewportBPD != Constants.DIMENSION_AUTO) {
return viewportBPD;
}
- return traitContentHeight(parentAreaCR_BPD);
+ float scalingFactor = this.getContentHeight(
+ this.intrinsicContentHeight(), viewportBPD);
+ return (int) (this.intrinsicContentHeight() * scalingFactor);
}
/**
@@ -125,15 +97,15 @@
}
public int inlineSizeOptimum(int lineLength) {
- return this.traitContentWidth(lineLength);
+ return this.viewportIPD(lineLength);
}
public int inlineSizeMinimum(int lineLength) {
- return this.traitContentWidth(lineLength);
+ return this.viewportIPD(lineLength);
}
public int inlineSizeMaximum(int lineLength) {
- return this.traitContentWidth(lineLength);
+ return this.viewportIPD(lineLength);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|