static CssLineBox GetLine(HitInfo hitInfo)
{
switch (hitInfo.hitObjectKind)
{
default:
case HitObjectKind.Unknown:
{
return null;
throw new NotSupportedException();
}
case HitObjectKind.LineBox:
{
return (CssLineBox)hitInfo.hitObject;
}
case HitObjectKind.Run:
{
return ((CssRun)hitInfo.hitObject).HostLine;
}
case HitObjectKind.CssBox:
{
return null;
}
}
}
static CssLineBox FindNearestLine(CssBox startBox, int globalY, int yRange)