Class TextStyle
Inheritance
System.Object
TextStyle
Syntax
public class TextStyle : Diagnosticable, IEquatable<TextStyle>
Constructors
TextStyle(Boolean, Color, Nullable<Single>, FontWeight, Nullable<FontStyle>, Nullable<Single>, Nullable<Single>, Nullable<TextBaseline>, Nullable<Single>, Paint, TextDecoration, Color, Nullable<TextDecorationStyle>, String, String)
Declaration
public TextStyle(bool inherit = true, Color color = null, float? fontSize = default(float? ), FontWeight fontWeight = null, FontStyle? fontStyle = default(FontStyle? ), float? letterSpacing = default(float? ), float? wordSpacing = default(float? ), TextBaseline? textBaseline = default(TextBaseline? ), float? height = default(float? ), Paint background = null, TextDecoration decoration = null, Color decorationColor = null, TextDecorationStyle? decorationStyle = default(TextDecorationStyle? ), string fontFamily = null, string debugLabel = null)
Parameters
Type |
Name |
Description |
System.Boolean |
inherit |
|
Color |
color |
|
System.Nullable<System.Single> |
fontSize |
|
FontWeight |
fontWeight |
|
System.Nullable<FontStyle> |
fontStyle |
|
System.Nullable<System.Single> |
letterSpacing |
|
System.Nullable<System.Single> |
wordSpacing |
|
System.Nullable<TextBaseline> |
textBaseline |
|
System.Nullable<System.Single> |
height |
|
Paint |
background |
|
TextDecoration |
decoration |
|
Color |
decorationColor |
|
System.Nullable<TextDecorationStyle> |
decorationStyle |
|
System.String |
fontFamily |
|
System.String |
debugLabel |
|
Fields
_defaultFontSize
Declaration
public static readonly float _defaultFontSize
Field Value
Type |
Description |
System.Single |
|
background
Declaration
public readonly Paint background
Field Value
color
Declaration
public readonly Color color
Field Value
debugLabel
Declaration
public readonly string debugLabel
Field Value
Type |
Description |
System.String |
|
decoration
Declaration
public readonly TextDecoration decoration
Field Value
decorationColor
Declaration
public readonly Color decorationColor
Field Value
decorationStyle
Declaration
public readonly TextDecorationStyle? decorationStyle
Field Value
fontFamily
Declaration
public readonly string fontFamily
Field Value
Type |
Description |
System.String |
|
fontSize
Declaration
public readonly float? fontSize
Field Value
Type |
Description |
System.Nullable<System.Single> |
|
fontStyle
Declaration
public readonly FontStyle? fontStyle
Field Value
fontWeight
Declaration
public readonly FontWeight fontWeight
Field Value
height
Declaration
public readonly float? height
Field Value
Type |
Description |
System.Nullable<System.Single> |
|
inherit
Declaration
public readonly bool inherit
Field Value
Type |
Description |
System.Boolean |
|
letterSpacing
Declaration
public readonly float? letterSpacing
Field Value
Type |
Description |
System.Nullable<System.Single> |
|
textBaseline
Declaration
public readonly TextBaseline? textBaseline
Field Value
wordSpacing
Declaration
public readonly float? wordSpacing
Field Value
Type |
Description |
System.Nullable<System.Single> |
|
Methods
apply(Color, TextDecoration, Color, Nullable<TextDecorationStyle>, String, Single, Single, Int32, Single, Single, Single, Single, Single, Single)
Declaration
public TextStyle apply(Color color = null, TextDecoration decoration = null, Color decorationColor = null, TextDecorationStyle? decorationStyle = default(TextDecorationStyle? ), string fontFamily = null, float fontSizeFactor = 1F, float fontSizeDelta = 0F, int fontWeightDelta = 0, float letterSpacingFactor = 1F, float letterSpacingDelta = 0F, float wordSpacingFactor = 1F, float wordSpacingDelta = 0F, float heightFactor = 1F, float heightDelta = 0F)
Parameters
Type |
Name |
Description |
Color |
color |
|
TextDecoration |
decoration |
|
Color |
decorationColor |
|
System.Nullable<TextDecorationStyle> |
decorationStyle |
|
System.String |
fontFamily |
|
System.Single |
fontSizeFactor |
|
System.Single |
fontSizeDelta |
|
System.Int32 |
fontWeightDelta |
|
System.Single |
letterSpacingFactor |
|
System.Single |
letterSpacingDelta |
|
System.Single |
wordSpacingFactor |
|
System.Single |
wordSpacingDelta |
|
System.Single |
heightFactor |
|
System.Single |
heightDelta |
|
Returns
compareTo(TextStyle)
Declaration
public RenderComparison compareTo(TextStyle other)
Parameters
Returns
copyWith(Color, String, Nullable<Single>, FontWeight, Nullable<FontStyle>, Nullable<Single>, Nullable<Single>, Nullable<TextBaseline>, Nullable<Single>, Paint, TextDecoration, Color, Nullable<TextDecorationStyle>, String)
Declaration
public TextStyle copyWith(Color color = null, string fontFamily = null, float? fontSize = default(float? ), FontWeight fontWeight = null, FontStyle? fontStyle = default(FontStyle? ), float? letterSpacing = default(float? ), float? wordSpacing = default(float? ), TextBaseline? textBaseline = default(TextBaseline? ), float? height = default(float? ), Paint background = null, TextDecoration decoration = null, Color decorationColor = null, TextDecorationStyle? decorationStyle = default(TextDecorationStyle? ), string debugLabel = null)
Parameters
Type |
Name |
Description |
Color |
color |
|
System.String |
fontFamily |
|
System.Nullable<System.Single> |
fontSize |
|
FontWeight |
fontWeight |
|
System.Nullable<FontStyle> |
fontStyle |
|
System.Nullable<System.Single> |
letterSpacing |
|
System.Nullable<System.Single> |
wordSpacing |
|
System.Nullable<TextBaseline> |
textBaseline |
|
System.Nullable<System.Single> |
height |
|
Paint |
background |
|
TextDecoration |
decoration |
|
Color |
decorationColor |
|
System.Nullable<TextDecorationStyle> |
decorationStyle |
|
System.String |
debugLabel |
|
Returns
debugFillProperties(DiagnosticPropertiesBuilder)
Declaration
public override void debugFillProperties(DiagnosticPropertiesBuilder properties)
Parameters
Overrides
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.Object.Equals(System.Object)
Equals(TextStyle)
Declaration
public bool Equals(TextStyle other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.Object.GetHashCode()
getParagraphStyle(TextAlign, TextDirection, String, Nullable<Int32>, Single)
Declaration
public ParagraphStyle getParagraphStyle(TextAlign textAlign, TextDirection textDirection, string ellipsis, int? maxLines, float textScaleFactor = 1F)
Parameters
Type |
Name |
Description |
TextAlign |
textAlign |
|
TextDirection |
textDirection |
|
System.String |
ellipsis |
|
System.Nullable<System.Int32> |
maxLines |
|
System.Single |
textScaleFactor |
|
Returns
lerp(TextStyle, TextStyle, Single)
Declaration
public static TextStyle lerp(TextStyle a, TextStyle b, float t)
Parameters
Returns
merge(TextStyle)
Declaration
public TextStyle merge(TextStyle other)
Parameters
Returns
toStringShort()
Declaration
public override string toStringShort()
Returns
Type |
Description |
System.String |
|
Overrides
Operators
Equality(TextStyle, TextStyle)
Declaration
public static bool operator ==(TextStyle left, TextStyle right)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Inequality(TextStyle, TextStyle)
Declaration
public static bool operator !=(TextStyle left, TextStyle right)
Parameters
Returns
Type |
Description |
System.Boolean |
|