[FOray-commit] SF.net SVN: foray:[13074] trunk/foray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2023-01-21 00:20:20
|
Revision: 13074
http://sourceforge.net/p/foray/code/13074
Author: victormote
Date: 2023-01-21 00:20:17 +0000 (Sat, 21 Jan 2023)
Log Message:
-----------
Conform to aXSL change: Add resolved factors from layout to construction of text areas.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractAncestralInlineArea.java
trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java
trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/PioneerLayoutStrategy.java
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractAncestralInlineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractAncestralInlineArea.java 2023-01-20 23:27:42 UTC (rev 13073)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/AbstractAncestralInlineArea.java 2023-01-21 00:20:17 UTC (rev 13074)
@@ -49,6 +49,7 @@
import org.axsl.galley.GlyphAreaSequenceG5;
import org.axsl.orthography.TextTokenFlowLocation;
+import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
@@ -75,7 +76,8 @@
@Override
public TextArea createGlyphAreaSequence(final FoTextCharacters foText, final int startOffset, final int sizeInChars,
- final boolean hasDiscretionaryHyphen, final boolean isLastItemOnLine) {
+ final boolean hasDiscretionaryHyphen, final boolean isLastItemOnLine, final int resolvedWordSpacing,
+ final int resolvedLetterSpacing, final BigDecimal resolvedIpdStretch) {
if (LineArea4a.shouldCreateTextArea(foText, this, startOffset, sizeInChars, isLastItemOnLine, this)) {
final TextArea newTextArea = TextAreaCharacters.makeTextArea(foText, this, startOffset, sizeInChars,
hasDiscretionaryHyphen);
@@ -87,7 +89,8 @@
@Override
public GlyphAreaSequenceG5 createGlyphAreaSequence(final FoTextWords paragraph,
- final TextTokenFlowLocation startLocation, final TextTokenFlowLocation endLocation) {
+ final TextTokenFlowLocation startLocation, final TextTokenFlowLocation endLocation,
+ final int resolvedWordSpacing, final int resolvedLetterSpacing, final BigDecimal resolvedIpdStretch) {
throw new UnsupportedOperationException();
}
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java 2023-01-20 23:27:42 UTC (rev 13073)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/LineArea4a.java 2023-01-21 00:20:17 UTC (rev 13074)
@@ -65,6 +65,7 @@
import org.axsl.value.TextAlignLast;
import org.axsl.value.WhiteSpaceTreatment;
+import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@@ -991,7 +992,8 @@
@Override
public TextArea createGlyphAreaSequence(final FoTextCharacters foText, final int startOffset, final int sizeInChars,
- final boolean hasDiscretionaryHyphen, final boolean isLastItemOnLine) {
+ final boolean hasDiscretionaryHyphen, final boolean isLastItemOnLine, final int resolvedWordSpacing,
+ final int resolvedLetterSpacing, final BigDecimal resolvedIpdStretch) {
if (shouldCreateTextArea(foText, this, startOffset, sizeInChars, isLastItemOnLine, this)) {
final TextAreaCharacters newTextArea = TextAreaCharacters.makeTextArea(foText, this, startOffset,
sizeInChars, hasDiscretionaryHyphen);
@@ -1003,7 +1005,8 @@
@Override
public GlyphAreaSequenceG5 createGlyphAreaSequence(final FoTextWords paragraph,
- final TextTokenFlowLocation startLocation, final TextTokenFlowLocation endLocation) {
+ final TextTokenFlowLocation startLocation, final TextTokenFlowLocation endLocation,
+ final int resolvedWordSpacing, final int resolvedLetterSpacing, final BigDecimal resolvedIpdStretch) {
final TextAreaWords newTextArea = TextAreaWords.makeTextArea(paragraph, this, startLocation, endLocation);
this.children.add(newTextArea);
return newTextArea;
Modified: trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java
===================================================================
--- trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java 2023-01-20 23:27:42 UTC (rev 13073)
+++ trunk/foray/foray-content/src/main/java/org/foray/content/TextTokensContent4a.java 2023-01-21 00:20:17 UTC (rev 13074)
@@ -173,7 +173,7 @@
* content item belongs on this line. */
final TextTokenFlowLocation end =
foTextTokenFlow.markLocation(tokenIndex, PrimitiveConstants.MAX_7_BIT_UNSIGNED_VALUE);
- lineArea.createGlyphAreaSequence(this.content, start, end);
+ lineArea.createGlyphAreaSequence(this.content, start, end, 0, 0, null);
return iterator.nextIndex();
}
}
@@ -181,13 +181,13 @@
tokenIndex = iterator.branchIndexAt(1);
segmentIndex = iterator.depth() > 2 ? iterator.branchIndexAt(2) : 0;
final TextTokenFlowLocation end = foTextTokenFlow.markLocation(tokenIndex, segmentIndex);
- lineArea.createGlyphAreaSequence(this.content, start, end);
+ lineArea.createGlyphAreaSequence(this.content, start, end, 0, 0, null);
return iterator.nextIndex();
}
/* The iterator is out of content. All of this content item goes on this line. */
final TextTokenFlowLocation end =
foTextTokenFlow.markLocation(tokenIndex, PrimitiveConstants.MAX_7_BIT_UNSIGNED_VALUE);
- lineArea.createGlyphAreaSequence(this.content, start, end);
+ lineArea.createGlyphAreaSequence(this.content, start, end, 0, 0, null);
return iterator.nextIndex();
}
Modified: trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.java
===================================================================
--- trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.java 2023-01-20 23:27:42 UTC (rev 13073)
+++ trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.java 2023-01-21 00:20:17 UTC (rev 13074)
@@ -127,7 +127,7 @@
final TextTokenFlowLocation endLocation =
this.node.getFoTokenFlow().markLocation(tokenIndex, segmentIndex);
- lineArea.createGlyphAreaSequence(this.node, startLocation, endLocation);
+ lineArea.createGlyphAreaSequence(this.node, startLocation, endLocation, 0, 0, null);
startLocation = endLocation;
}
Modified: trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/PioneerLayoutStrategy.java
===================================================================
--- trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/PioneerLayoutStrategy.java 2023-01-20 23:27:42 UTC (rev 13073)
+++ trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/PioneerLayoutStrategy.java 2023-01-21 00:20:17 UTC (rev 13074)
@@ -747,7 +747,8 @@
}
if (textToUse instanceof FoTextCharacters) {
final FoTextCharacters foText = (FoTextCharacters) textToUse;
- factory.createGlyphAreaSequence(foText, startOffset, sizeInChars, hasDiscretionaryHyphen, isLastItemOnLine);
+ factory.createGlyphAreaSequence(foText, startOffset, sizeInChars, hasDiscretionaryHyphen, isLastItemOnLine,
+ 0, 0, null);
} else {
throw new TextException("Returned LineText is an unknown type.");
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|