Package com.openhtmltopdf.bidi
Interface BidiSplitter
-
- All Known Implementing Classes:
ICUBidiSplitter
,SimpleBidiSplitter
public interface BidiSplitter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
countTextRuns()
Count the number of runs, each of which contains text in one visual order only.byte
getBaseDirection(java.lang.String paragraph)
Get the base direction of a paragraph.BidiTextRun
getVisualRun(int runIndex)
void
setParagraph(java.lang.String paragraph, byte defaultDirection)
Sets the text which is to be split on visual ordering.
-
-
-
Field Detail
-
LTR
static final byte LTR
- See Also:
- Constant Field Values
-
RTL
static final byte RTL
- See Also:
- Constant Field Values
-
NEUTRAL
static final byte NEUTRAL
- See Also:
- Constant Field Values
-
-
Method Detail
-
setParagraph
void setParagraph(java.lang.String paragraph, byte defaultDirection)
Sets the text which is to be split on visual ordering.- Parameters:
paragraph
-defaultDirection
- either LTR or RTL
-
countTextRuns
int countTextRuns()
Count the number of runs, each of which contains text in one visual order only. Can only be called after setParagraph has run the BIDI algorithm.
-
getVisualRun
BidiTextRun getVisualRun(int runIndex)
- Parameters:
runIndex
- from zero to countTextRuns.- Returns:
- information about a visual run.
-
getBaseDirection
byte getBaseDirection(java.lang.String paragraph)
Get the base direction of a paragraph. Defined as the first character that has strong directionality or neutral if they are all neutral characters.
-
-