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

Settings related to text. 文本的相关设置。 More...

Inheritance diagram for XCharts.TextStyle:
Collaboration diagram for XCharts.TextStyle:

Public Member Functions

 TextStyle (int fontSize)
 
 TextStyle (int fontSize, FontStyle fontStyle)
 
 TextStyle (int fontSize, FontStyle fontStyle, Color color)
 
 TextStyle (int fontSize, FontStyle fontStyle, Color color, int rorate)
 
void Copy (TextStyle textStyle)
 
void UpdateAlignmentByLocation (Location location)
 
Color GetColor (Color defaultColor)
 
int GetFontSize (ComponentTheme defaultTheme)
 
TextAnchor GetAlignment (TextAnchor systemAlignment)
 
- 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

float rotate [get, set]
 Rotation of text. 文本的旋转。 [default: 0f] More...
 
Vector2 offset [get, set]
 the offset of position. 坐标偏移。 [Default: Vector2.zero] More...
 
Vector3 offsetv3 [get]
 
Color color [get, set]
 the color of text. 文本的颜色。 [default: Color.clear] More...
 
Color backgroundColor [get, set]
 the color of text. 文本的背景颜色。 [default: Color.clear] More...
 
Font font [get, set]
 the font of text. When null, the theme's font is used by default. 文本字体。 [default: null] More...
 
int fontSize [get, set]
 font size. 文本字体大小。 [default: 18] More...
 
FontStyle fontStyle [get, set]
 font style. 文本字体的风格。 [default: FontStyle.Normal] More...
 
float lineSpacing [get, set]
 text line spacing. 行间距。 [default: 1f] More...
 
bool autoWrap [get, set]
 是否自动换行。 More...
 
bool autoAlign [get, set]
 文本是否让系统自动选对齐方式。为false时才会用alignment。 More...
 
TextAnchor alignment [get, set]
 对齐方式。 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

Settings related to text. 文本的相关设置。

Definition at line 21 of file TextStyle.cs.

Property Documentation

◆ alignment

TextAnchor XCharts.TextStyle.alignment
getset

对齐方式。

Definition at line 142 of file TextStyle.cs.

142  {
143  get { return m_Alignment; }
144  set { if (PropertyUtil.SetStruct(ref m_Alignment, value)) SetComponentDirty(); }
145  }

◆ autoAlign

bool XCharts.TextStyle.autoAlign
getset

文本是否让系统自动选对齐方式。为false时才会用alignment。

Definition at line 134 of file TextStyle.cs.

134  {
135  get { return m_AutoAlign; }
136  set { if (PropertyUtil.SetStruct(ref m_AutoAlign, value)) SetComponentDirty(); }
137  }

◆ autoWrap

bool XCharts.TextStyle.autoWrap
getset

是否自动换行。

Definition at line 126 of file TextStyle.cs.

126  {
127  get { return m_AutoWrap; }
128  set { if (PropertyUtil.SetStruct(ref m_AutoWrap, value)) SetComponentDirty(); }
129  }

◆ backgroundColor

Color XCharts.TextStyle.backgroundColor
getset

the color of text. 文本的背景颜色。 [default: Color.clear]

Definition at line 78 of file TextStyle.cs.

78  {
79  get { return m_BackgroundColor; }
80  set { if (PropertyUtil.SetColor(ref m_BackgroundColor, value)) SetComponentDirty(); }
81  }

◆ color

Color XCharts.TextStyle.color
getset

the color of text. 文本的颜色。 [default: Color.clear]

Definition at line 68 of file TextStyle.cs.

68  {
69  get { return m_Color; }
70  set { if (PropertyUtil.SetColor(ref m_Color, value)) SetComponentDirty(); }
71  }

◆ font

Font XCharts.TextStyle.font
getset

the font of text. When null, the theme's font is used by default. 文本字体。 [default: null]

Definition at line 88 of file TextStyle.cs.

88  {
89  get { return m_Font; }
90  set { if (PropertyUtil.SetClass(ref m_Font, value)) SetComponentDirty(); }
91  }

◆ fontSize

int XCharts.TextStyle.fontSize
getset

font size. 文本字体大小。 [default: 18]

Definition at line 98 of file TextStyle.cs.

98  {
99  get { return m_FontSize; }
100  set { if (PropertyUtil.SetStruct(ref m_FontSize, value)) SetComponentDirty(); }
101  }

◆ fontStyle

FontStyle XCharts.TextStyle.fontStyle
getset

font style. 文本字体的风格。 [default: FontStyle.Normal]

Definition at line 108 of file TextStyle.cs.

108  {
109  get { return m_FontStyle; }
110  set { if (PropertyUtil.SetStruct(ref m_FontStyle, value)) SetComponentDirty(); }
111  }

◆ lineSpacing

float XCharts.TextStyle.lineSpacing
getset

text line spacing. 行间距。 [default: 1f]

Definition at line 118 of file TextStyle.cs.

118  {
119  get { return m_LineSpacing; }
120  set { if (PropertyUtil.SetStruct(ref m_LineSpacing, value)) SetComponentDirty(); }
121  }

◆ offset

Vector2 XCharts.TextStyle.offset
getset

the offset of position. 坐标偏移。 [Default: Vector2.zero]

Definition at line 55 of file TextStyle.cs.

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

◆ rotate

float XCharts.TextStyle.rotate
getset

Rotation of text. 文本的旋转。 [default: 0f]

Definition at line 45 of file TextStyle.cs.

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

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