Class CharacterRenderInfo
- java.lang.Object
-
- com.itextpdf.kernel.pdf.canvas.parser.listener.TextChunk
-
- com.itextpdf.kernel.pdf.canvas.parser.listener.CharacterRenderInfo
-
public class CharacterRenderInfo extends TextChunk
This class represents a single character and its bounding box
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
CharacterRenderInfo.StringConversionInfo
-
Field Summary
Fields Modifier and Type Field Description private Rectangle
boundingBox
-
Constructor Summary
Constructors Constructor Description CharacterRenderInfo(TextRenderInfo tri)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Rectangle
getBoundingBox()
private static ITextChunkLocation
getLocation(TextRenderInfo tri)
(package private) static CharacterRenderInfo.StringConversionInfo
mapString(java.util.List<CharacterRenderInfo> cris)
This method converts aList
ofCharacterRenderInfo
.private static void
putCharsWithIndex(java.lang.CharSequence seq, int index, java.util.Map<java.lang.Integer,java.lang.Integer> indexMap, java.lang.StringBuilder sb)
-
Methods inherited from class com.itextpdf.kernel.pdf.canvas.parser.listener.TextChunk
getLocation, getText, printDiagnostics, sameLine
-
-
-
-
Field Detail
-
boundingBox
private Rectangle boundingBox
-
-
Constructor Detail
-
CharacterRenderInfo
public CharacterRenderInfo(TextRenderInfo tri)
-
-
Method Detail
-
mapString
static CharacterRenderInfo.StringConversionInfo mapString(java.util.List<CharacterRenderInfo> cris)
This method converts aList
ofCharacterRenderInfo
. The returned data structure contains both the plaintext and the mapping of indices (from the list to the string). These indices can differ; if there is sufficient spacing between two CharacterRenderInfo objects, this algorithm will decide to insert space. The inserted space will cause the indices to differ by at least 1.
-
putCharsWithIndex
private static void putCharsWithIndex(java.lang.CharSequence seq, int index, java.util.Map<java.lang.Integer,java.lang.Integer> indexMap, java.lang.StringBuilder sb)
-
getBoundingBox
public Rectangle getBoundingBox()
-
getLocation
private static ITextChunkLocation getLocation(TextRenderInfo tri)
-
-