|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.itextpdf.text.pdf.parser.LocationTextExtractionStrategy.TextChunk
private static class LocationTextExtractionStrategy.TextChunk
Represents a chunk of text, it's orientation, and location relative to the orientation vector
Field Summary | |
---|---|
(package private) float |
charSpaceWidth
the width of a single space character in the font of the chunk |
(package private) float |
distParallelEnd
distance of the end of the chunk parallel to the orientation unit vector (i.e. |
(package private) float |
distParallelStart
distance of the start of the chunk parallel to the orientation unit vector (i.e. |
(package private) int |
distPerpendicular
perpendicular distance to the orientation unit vector (i.e. |
(package private) Vector |
endLocation
the ending location of the chunk |
(package private) int |
orientationMagnitude
the orientation as a scalar for quick sorting |
(package private) Vector |
orientationVector
unit vector in the orientation of the chunk |
(package private) Vector |
startLocation
the starting location of the chunk |
(package private) String |
text
the text of the chunk |
Constructor Summary | |
---|---|
LocationTextExtractionStrategy.TextChunk(String string,
Vector startLocation,
Vector endLocation,
float charSpaceWidth)
|
Method Summary | |
---|---|
private static int |
compareInts(int int1,
int int2)
|
int |
compareTo(LocationTextExtractionStrategy.TextChunk rhs)
Compares based on orientation, perpendicular distance, then parallel distance |
float |
distanceFromEndOf(LocationTextExtractionStrategy.TextChunk other)
Computes the distance between the end of 'other' and the beginning of this chunk in the direction of this chunk's orientation vector. |
private void |
printDiagnostics()
|
boolean |
sameLine(LocationTextExtractionStrategy.TextChunk as)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
final String text
final Vector startLocation
final Vector endLocation
final Vector orientationVector
final int orientationMagnitude
final int distPerpendicular
final float distParallelStart
final float distParallelEnd
final float charSpaceWidth
Constructor Detail |
---|
public LocationTextExtractionStrategy.TextChunk(String string, Vector startLocation, Vector endLocation, float charSpaceWidth)
Method Detail |
---|
private void printDiagnostics()
public boolean sameLine(LocationTextExtractionStrategy.TextChunk as)
as
- the location to compare to
public float distanceFromEndOf(LocationTextExtractionStrategy.TextChunk other)
other
-
public int compareTo(LocationTextExtractionStrategy.TextChunk rhs)
compareTo
in interface Comparable<LocationTextExtractionStrategy.TextChunk>
Comparable.compareTo(java.lang.Object)
private static int compareInts(int int1, int int2)
int1
- int2
-
|
Hosted by openminds | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |