Determines the relative offset into the given text that
best represents the given span in the view coordinate
system. This is implemented in a 1.1 style coordinate
system where ints are used and 72dpi is assumed.
Returns:
the offset into the text >= 0
Parameters:
-
s - the source of the text
-
metrics - the font metrics to use for the calculation
-
x0 - the starting view location representing the start
of the given text >= 0.
-
x - the target view location to translate to an
offset into the text >= 0.
-
e - how to expand the tabs. If this value is null,
tabs will be expanded as a space character.
-
startOffset - starting offset of the text in the document >= 0