public TextLocation GetTextLocation(float x)
{
var text = TextLayer.Document.GetText(DocumentLine.Offset, DocumentLine.Length);
int index;
TextRenderer.GetPositionTextIndex(text, Skin.DefaultFont, x, out index);
Console.WriteLine(index);
//Line and Column indexes start at 1
return new TextLocation(DocumentLine.LineNumber,index+1);
}