AirControl  1.3.0
Open Source, Modular, and Extensible Flight Simulator For Deep Learning Research
XCharts.TextLimit Class Reference

Text character limitation and adaptation component. When the length of the text exceeds the set length, it is cropped and suffixes are appended to the end.Only valid in the category axis. 文本字符限制和自适应。当文本长度超过设定的长度时进行裁剪,并将后缀附加在最后。 只在类目轴中有效。 More...

Inheritance diagram for XCharts.TextLimit:
Collaboration diagram for XCharts.TextLimit:

Public Member Functions

TextLimit Clone ()
 
void Copy (TextLimit textLimit)
 
void SetRelatedText (ChartText txt, float labelWidth)
 
string GetLimitContent (string content)
 
- Public Member Functions inherited from XCharts.ChartComponent
virtual void SetVerticesDirty ()
 
virtual void ClearVerticesDirty ()
 
virtual void SetComponentDirty ()
 
virtual void ClearComponentDirty ()
 
virtual void ClearDirty ()
 
virtual void SetAllDirty ()
 

Properties

bool enable [get, set]
 Whether to enable text limit. 是否启用文本自适应。 [default:true] More...
 
float maxWidth [get, set]
 Set the maximum width. A default of 0 indicates automatic fetch; otherwise, custom. Clipping occurs when the width of the text is greater than this value. 设定最大宽度。默认为0表示自动获取,否则表示自定义。当文本的宽度大于该值进行裁剪。 More...
 
float gap [get, set]
 White pixel distance at both ends. 两边留白像素距离。 [default:10f] More...
 
string suffix [get, set]
 Suffixes when the length exceeds. 长度超出时的后缀。 [default: "..."] More...
 
- Properties inherited from XCharts.ChartComponent
virtual bool vertsDirty [get]
 图表重绘标记。 More...
 
virtual bool componentDirty [get]
 组件重新初始化标记。 More...
 
bool anyDirty [get]
 需要重绘图表或重新初始化组件。 More...
 
Painter painter [get, set]
 
Action refreshComponent [get, set]
 
GameObject gameObject [get, set]
 

Additional Inherited Members

- Protected Attributes inherited from XCharts.ChartComponent
bool m_VertsDirty
 
bool m_ComponentDirty
 
Painter m_Painter
 

Detailed Description

Text character limitation and adaptation component. When the length of the text exceeds the set length, it is cropped and suffixes are appended to the end.Only valid in the category axis. 文本字符限制和自适应。当文本长度超过设定的长度时进行裁剪,并将后缀附加在最后。 只在类目轴中有效。

Definition at line 21 of file TextLimit.cs.

Property Documentation

◆ enable

bool XCharts.TextLimit.enable
getset

Whether to enable text limit. 是否启用文本自适应。 [default:true]

Definition at line 34 of file TextLimit.cs.

34  {
35  get { return m_Enable; }
36  set { if (PropertyUtil.SetStruct(ref m_Enable, value)) SetComponentDirty(); }
37  }

◆ gap

float XCharts.TextLimit.gap
getset

White pixel distance at both ends. 两边留白像素距离。 [default:10f]

Definition at line 54 of file TextLimit.cs.

54  {
55  get { return m_Gap; }
56  set { if (PropertyUtil.SetStruct(ref m_Gap, value)) SetComponentDirty(); }
57  }

◆ maxWidth

float XCharts.TextLimit.maxWidth
getset

Set the maximum width. A default of 0 indicates automatic fetch; otherwise, custom. Clipping occurs when the width of the text is greater than this value. 设定最大宽度。默认为0表示自动获取,否则表示自定义。当文本的宽度大于该值进行裁剪。

Definition at line 44 of file TextLimit.cs.

44  {
45  get { return m_MaxWidth; }
46  set { if (PropertyUtil.SetStruct(ref m_MaxWidth, value)) SetComponentDirty(); }
47  }

◆ suffix

string XCharts.TextLimit.suffix
getset

Suffixes when the length exceeds. 长度超出时的后缀。 [default: "..."]

Definition at line 64 of file TextLimit.cs.

64  {
65  get { return m_Suffix; }
66  set { if (PropertyUtil.SetClass(ref m_Suffix, value)) SetComponentDirty(); }
67  }

The documentation for this class was generated from the following file: