From c55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 19 Apr 2020 17:19:32 -0400 Subject: Inital commit --- .../Scripts/Runtime/TMP_LineInfo.cs | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_LineInfo.cs (limited to 'Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_LineInfo.cs') diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_LineInfo.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_LineInfo.cs new file mode 100644 index 0000000..6f90157 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_LineInfo.cs @@ -0,0 +1,52 @@ +namespace TMPro +{ + + /// + /// Structure which contains information about the individual lines of text. + /// + public struct TMP_LineInfo + { + internal int controlCharacterCount; + + public int characterCount; + public int visibleCharacterCount; + public int spaceCount; + public int wordCount; + public int firstCharacterIndex; + public int firstVisibleCharacterIndex; + public int lastCharacterIndex; + public int lastVisibleCharacterIndex; + + public float length; + public float lineHeight; + public float ascender; + public float baseline; + public float descender; + public float maxAdvance; + + public float width; + public float marginLeft; + public float marginRight; + + public TextAlignmentOptions alignment; + public Extents lineExtents; + + + /// + /// Function returning the current line of text. + /// + /// + //public string GetLineText() + //{ + // string word = string.Empty; + // TMP_CharacterInfo[] charInfo = textComponent.textInfo.characterInfo; + + // for (int i = firstCharacterIndex; i < lastCharacterIndex + 1; i++) + // { + // word += charInfo[i].character; + // } + + // return word; + //} + } +} \ No newline at end of file -- cgit v1.2.3