public class BidiLine extends Object
Modifier and Type | Field and Description |
---|---|
protected int |
arabicOptions |
protected ArrayList<PdfChunk> |
chunks |
protected int |
currentChar |
protected PdfChunk[] |
detailChunks |
protected int[] |
indexChars |
protected int |
indexChunk |
protected int |
indexChunkChar |
protected boolean |
isWordSplit |
protected static IntHashtable |
mirrorChars |
protected byte[] |
orderLevels |
protected int |
pieceSize |
protected int |
runDirection |
protected boolean |
shortStore |
protected int |
storedCurrentChar |
protected PdfChunk[] |
storedDetailChunks |
protected int[] |
storedIndexChars |
protected int |
storedIndexChunk |
protected int |
storedIndexChunkChar |
protected byte[] |
storedOrderLevels |
protected int |
storedRunDirection |
protected char[] |
storedText |
protected int |
storedTotalTextLength |
protected char[] |
text |
protected int |
totalTextLength |
Constructor and Description |
---|
BidiLine()
Creates new BidiLine
|
BidiLine(BidiLine org) |
Modifier and Type | Method and Description |
---|---|
void |
addChunk(PdfChunk chunk) |
void |
addChunks(ArrayList<PdfChunk> chunks) |
void |
addPiece(char c, PdfChunk chunk) |
void |
clearChunks() |
ArrayList<PdfChunk> |
createArrayOfPdfChunks(int startIdx, int endIdx) |
ArrayList<PdfChunk> |
createArrayOfPdfChunks(int startIdx, int endIdx, PdfChunk extraPdfChunk) |
void |
doArabicShapping() |
void |
flip(int start, int end) |
boolean |
getParagraph(int runDirection) |
float |
getWidth(int startIdx, int lastIdx)
Gets the width of a range of characters.
|
float |
getWidth(int startIdx, int lastIdx, float originalWidth)
Gets the width of a range of characters.
|
int[] |
getWord(int startIdx, int idx) |
boolean |
isEmpty() |
boolean |
isWordSplit()
Call this after processLine() to know if any word was split into several lines.
|
static boolean |
isWS(char c) |
void |
mirrorGlyphs() |
PdfLine |
processLine(float leftX, float width, int alignment, int runDirection, int arabicOptions, float minY, float yLine, float descender) |
static String |
processLTR(String s, int runDirection, int arabicOptions)
Method that changes a String with Arabic characters into a String in which the ligatures are made.
|
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) |
protected int runDirection
protected int pieceSize
protected char[] text
protected PdfChunk[] detailChunks
protected int totalTextLength
protected byte[] orderLevels
protected int[] indexChars
protected int indexChunk
protected int indexChunkChar
protected int currentChar
protected int storedRunDirection
protected char[] storedText
protected PdfChunk[] storedDetailChunks
protected int storedTotalTextLength
protected byte[] storedOrderLevels
protected int[] storedIndexChars
protected int storedIndexChunk
protected int storedIndexChunkChar
protected int storedCurrentChar
protected boolean isWordSplit
protected boolean shortStore
protected static final IntHashtable mirrorChars
protected int arabicOptions
public BidiLine()
public BidiLine(BidiLine org)
public boolean isEmpty()
public void clearChunks()
public boolean getParagraph(int runDirection)
public void addChunk(PdfChunk chunk)
public void addPiece(char c, PdfChunk chunk)
public void save()
public void restore()
public void mirrorGlyphs()
public void doArabicShapping()
public PdfLine processLine(float leftX, float width, int alignment, int runDirection, int arabicOptions, float minY, float yLine, float descender)
public boolean isWordSplit()
public float getWidth(int startIdx, int lastIdx)
startIdx
- the first index to calculate
lastIdx
- the last inclusive index to calculate
public float getWidth(int startIdx, int lastIdx, float originalWidth)
startIdx
- the first index to calculate
lastIdx
- the last inclusive index to calculate
originalWidth
- the full width of the line. It is used in case of RTL and tab stops
public ArrayList<PdfChunk> createArrayOfPdfChunks(int startIdx, int endIdx, PdfChunk extraPdfChunk)
public int[] getWord(int startIdx, int idx)
public int trimRight(int startIdx, int endIdx)
public int trimLeft(int startIdx, int endIdx)
public int trimRightEx(int startIdx, int endIdx)
public int trimLeftEx(int startIdx, int endIdx)
public void reorder(int start, int end)
public void flip(int start, int end)
public static boolean isWS(char c)
Copyright © 1998–2018. All rights reserved.