Class LocationTextExtractionStrategy.TextChunk

    • Method Detail

      • getText

        public java.lang.String getText()
        Returns:
        the text captured by this chunk
      • getStartLocation

        public Vector getStartLocation()
        Returns:
        the start location of the text
      • getEndLocation

        public Vector getEndLocation()
        Returns:
        the end location of the text
      • getCharSpaceWidth

        public float getCharSpaceWidth()
        Returns:
        the width of a single space character as rendered by this chunk
      • distanceFromEndOf

        public 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. Note that it's a bad idea to call this for chunks that aren't on the same line and orientation, but we don't explicitly check for that condition for performance reasons.
        Parameters:
        other - the other LocationTextExtractionStrategy.TextChunk
        Returns:
        the number of spaces between the end of 'other' and the beginning of this chunk
      • printDiagnostics

        private void printDiagnostics()