Revision: 7300
Author: victormote
Date: 2006-05-29 11:17:42 -0700 (Mon, 29 May 2006)
ViewCVS: http://svn.sourceforge.net/foray/?rev=7300&view=rev
Log Message:
-----------
Correct computation of remaining space in area. Was double-counting the space already used.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java 2006-05-29 17:51:49 UTC (rev 7299)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/NormalBlockArea.java 2006-05-29 18:17:42 UTC (rev 7300)
@@ -105,11 +105,12 @@
*/
public org.axsl.areaW.LineArea createNextLineArea() {
/* The size of the next line does not need to consider the half-leading
- * that follows the line. */
+ * that follows the line. That half-leading will be automatically
+ * handled if the line is actually created, but can safely be ignored
+ * for purposes of deciding whether the line will fit. */
int sizeNextLineArea = this.traitFontSize()
+ this.traitHalfLeadingOpt();
- if (this.getProgressionDimension()
- + sizeNextLineArea
+ if (sizeNextLineArea
> this.progressionDimensionAvailable()) {
return null;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|