TMP_LineInfo.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. namespace TMPro
  2. {
  3. /// <summary>
  4. /// Structure which contains information about the individual lines of text.
  5. /// </summary>
  6. public struct TMP_LineInfo
  7. {
  8. internal int controlCharacterCount;
  9. public int characterCount;
  10. public int visibleCharacterCount;
  11. public int spaceCount;
  12. public int wordCount;
  13. public int firstCharacterIndex;
  14. public int firstVisibleCharacterIndex;
  15. public int lastCharacterIndex;
  16. public int lastVisibleCharacterIndex;
  17. public float length;
  18. public float lineHeight;
  19. public float ascender;
  20. public float baseline;
  21. public float descender;
  22. public float maxAdvance;
  23. public float width;
  24. public float marginLeft;
  25. public float marginRight;
  26. public HorizontalAlignmentOptions alignment;
  27. public Extents lineExtents;
  28. /// <summary>
  29. /// Function returning the current line of text.
  30. /// </summary>
  31. /// <returns></returns>
  32. //public string GetLineText()
  33. //{
  34. // string word = string.Empty;
  35. // TMP_CharacterInfo[] charInfo = textComponent.textInfo.characterInfo;
  36. // for (int i = firstCharacterIndex; i < lastCharacterIndex + 1; i++)
  37. // {
  38. // word += charInfo[i].character;
  39. // }
  40. // return word;
  41. //}
  42. }
  43. }