Package com.lowagie.text.pdf
Class BidiLine
java.lang.Object
com.lowagie.text.pdf.BidiLine
Does all the line bidirectional processing with PdfChunk assembly.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
protected int
protected PdfChunk[]
protected int[]
protected int
protected int
protected static final IntHashtable
protected byte[]
protected int
protected int
protected boolean
protected int
protected PdfChunk[]
protected int[]
protected int
protected int
protected byte[]
protected int
protected char[]
protected int
protected char[]
protected int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
void
createArrayOfPdfChunks
(int startIdx, int endIdx) createArrayOfPdfChunks
(int startIdx, int endIdx, PdfChunk extraPdfChunk) void
void
flip
(int start, int end) boolean
getParagraph
(int runDirection) float
getWidth
(int startIdx, int lastIdx) Gets the width of a range of characters.int[]
getWord
(int startIdx, int idx) boolean
isEmpty()
static boolean
isWS
(char c) void
processLine
(float leftX, float width, int alignment, int runDirection, int arabicOptions) void
reorder
(int start, int end) void
restore()
void
save()
int
trimLeft
(int startIdx, int endIdx) int
trimLeftEx
(int startIdx, int endIdx) int
trimRight
(int startIdx, int endIdx) int
trimRightEx
(int startIdx, int endIdx)
-
Field Details
-
mirrorChars
-
runDirection
protected int runDirection -
pieceSize
protected int pieceSize -
text
protected char[] text -
detailChunks
-
totalTextLength
protected int totalTextLength -
orderLevels
protected byte[] orderLevels -
indexChars
protected int[] indexChars -
chunks
-
indexChunk
protected int indexChunk -
indexChunkChar
protected int indexChunkChar -
currentChar
protected int currentChar -
storedRunDirection
protected int storedRunDirection -
storedText
protected char[] storedText -
storedDetailChunks
-
storedTotalTextLength
protected int storedTotalTextLength -
storedOrderLevels
protected byte[] storedOrderLevels -
storedIndexChars
protected int[] storedIndexChars -
storedIndexChunk
protected int storedIndexChunk -
storedIndexChunkChar
protected int storedIndexChunkChar -
storedCurrentChar
protected int storedCurrentChar -
shortStore
protected boolean shortStore -
arabicOptions
protected int arabicOptions
-
-
Constructor Details
-
BidiLine
public BidiLine()Creates new BidiLine -
BidiLine
-
-
Method Details
-
isWS
public static boolean isWS(char c) -
isEmpty
public boolean isEmpty() -
clearChunks
public void clearChunks() -
getParagraph
public boolean getParagraph(int runDirection) -
addChunk
-
addChunks
-
addPiece
-
save
public void save() -
restore
public void restore() -
mirrorGlyphs
public void mirrorGlyphs() -
doArabicShapping
public void doArabicShapping() -
processLine
public PdfLine processLine(float leftX, float width, int alignment, int runDirection, int arabicOptions) -
getWidth
public float getWidth(int startIdx, int lastIdx) Gets the width of a range of characters.- Parameters:
startIdx
- the first index to calculatelastIdx
- the last inclusive index to calculate- Returns:
- the sum of all widths
-
createArrayOfPdfChunks
-
createArrayOfPdfChunks
-
getWord
public int[] getWord(int startIdx, int idx) -
trimRight
public int trimRight(int startIdx, int endIdx) -
trimLeft
public int trimLeft(int startIdx, int endIdx) -
trimRightEx
public int trimRightEx(int startIdx, int endIdx) -
trimLeftEx
public int trimLeftEx(int startIdx, int endIdx) -
reorder
public void reorder(int start, int end) -
flip
public void flip(int start, int end)
-