internal virtual void PrintDiagnostics() { System.Console.Out.WriteLine("Text (@" + location.GetStartLocation() + " -> " + location.GetEndLocation() + "): " + text); System.Console.Out.WriteLine("orientationMagnitude: " + location.OrientationMagnitude()); System.Console.Out.WriteLine("distPerpendicular: " + location.DistPerpendicular()); System.Console.Out.WriteLine("distParallel: " + location.DistParallelStart()); }
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); }