[]
Provides extension methods for the ITextMap interface.
public static class ITextMapExt
Returns the TextMapFragment containing all characters inside the specified quadrilateral, or null if no fragment could be found. A character is included if 50% or more of its area is inside the quadrilateral.
public static TextMapFragment GetFragmentFromQuadrilateral(this ITextMap tm, Quadrilateral bounds)
tm
ITextMapThe current ITextMap.
bounds
QuadrilateralThe target bounds.
The TextMapFragment containing all characters inside bounds
, or null.
Returns the TextMapFragment containing all characters inside the specified rectangle, or null if no fragment could be found. A character is included if 50% or more of its area is inside the quadrilateral.
public static TextMapFragment GetFragmentFromRect(this ITextMap tm, RectangleF bounds)
The TextMapFragment containing all characters inside bounds
, or null.
Gets the lines of text in a TextMapFragment.
public static List<string> GetLines(this ITextMap tm, TextMapFragment fragment)
tm
ITextMapThe current ITextMap.
fragment
TextMapFragmentThe target fragment.
The list of all lines belonging to the fragment..
Gets the text of a TextMapFragment.
public static string GetText(this ITextMap tm, TextMapFragment fragment)
tm
ITextMapThe current ITextMap.
fragment
TextMapFragmentThe target fragment.
The text of the fragment.