Beispiel #1
0
        protected override bool IsChunkAtWordBoundary(TextChunk chunk, TextChunk previousChunk)
        {
            ITextChunkLocation curLoc  = chunk.GetLocation();
            ITextChunkLocation prevLoc = previousChunk.GetLocation();

            if (curLoc.GetStartLocation().Equals(curLoc.GetEndLocation()) || prevLoc.GetEndLocation().Equals(prevLoc.GetStartLocation
                                                                                                                 ()))
            {
                return(false);
            }
            return(curLoc.DistParallelEnd() - prevLoc.DistParallelStart() > (curLoc.GetCharSpaceWidth() + prevLoc.GetCharSpaceWidth
                                                                                 ()) / 2.0f);
        }