Package com.lowagie.text.pdf
Class BidiLine
java.lang.Object
com.lowagie.text.pdf.BidiLine
Does all the line bidirectional processing with PdfChunk assembly.
- Author:
- Paulo Soares (psoares@consiste.pt)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected ArrayListprotected intprotected PdfChunk[]protected int[]protected intprotected intprotected static final IntHashtableprotected byte[]protected intprotected intprotected booleanprotected intprotected PdfChunk[]protected int[]protected intprotected intprotected byte[]protected intprotected char[]protected intprotected char[]protected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidcreateArrayOfPdfChunks(int startIdx, int endIdx) createArrayOfPdfChunks(int startIdx, int endIdx, PdfChunk extraPdfChunk) voidvoidflip(int start, int end) booleangetParagraph(int runDirection) floatgetWidth(int startIdx, int lastIdx) Gets the width of a range of characters.int[]getWord(int startIdx, int idx) booleanisEmpty()static booleanisWS(char c) voidprocessLine(float leftX, float width, int alignment, int runDirection, int arabicOptions) voidreorder(int start, int end) voidrestore()voidsave()inttrimLeft(int startIdx, int endIdx) inttrimLeftEx(int startIdx, int endIdx) inttrimRight(int startIdx, int endIdx) inttrimRightEx(int startIdx, int endIdx)
-
Field Details
-
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 -
mirrorChars
-
arabicOptions
protected int arabicOptions
-
-
Constructor Details
-
BidiLine
public BidiLine()Creates new BidiLine -
BidiLine
-
-
Method Details
-
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) -
isWS
public static boolean isWS(char c)
-