RichTextKit v0.4

Style.Modify Method

Assembly: Topten.RichTextKit.dll
Namespace: Topten.RichTextKit
Declaring Type: Style

Modifies this style with one or more attribute changes and returns a new style

public Style Modify(string fontFamily = null, Nullable<float> fontSize = null, Nullable<int> fontWeight = null, Nullable<SkiaSharp.SKFontStyleWidth> fontWidth = null, Nullable<bool> fontItalic = null, Nullable<UnderlineStyle> underline = null, Nullable<StrikeThroughStyle> strikeThrough = null, Nullable<float> lineHeight = null, Nullable<SkiaSharp.SKColor> textColor = null, Nullable<SkiaSharp.SKColor> backgroundColor = null, Nullable<SkiaSharp.SKColor> haloColor = null, Nullable<float> haloWidth = null, Nullable<float> haloBlur = null, Nullable<float> letterSpacing = null, Nullable<FontVariant> fontVariant = null, Nullable<TextDirection> textDirection = null, Nullable<char> replacementCharacter = null);

Remarks

Note this method always creates a new style instance.To avoid creating excessive style instances, consider using the StyleManager which caches instances of styles with the same attributes

Parameters

string fontFamily = null

The new font family

Nullable<float> fontSize = null

The new font size

Nullable<int> fontWeight = null

The new font weight

Nullable<SkiaSharp.SKFontStyleWidth> fontWidth = null

The new font width

Nullable<bool> fontItalic = null

The new font italic

Nullable<UnderlineStyle> underline = null

The new underline style

Nullable<StrikeThroughStyle> strikeThrough = null

The new strike-through style

Nullable<float> lineHeight = null

The new line height

Nullable<SkiaSharp.SKColor> textColor = null

The new text color

Nullable<SkiaSharp.SKColor> backgroundColor = null

The new background color

Nullable<SkiaSharp.SKColor> haloColor = null

Color of the halo background

Nullable<float> haloWidth = null

Width of the halo background

Nullable<float> haloBlur = null

Blur amount for the halo background

Nullable<float> letterSpacing = null

The new letterSpacing

Nullable<FontVariant> fontVariant = null

The new font variant

Nullable<TextDirection> textDirection = null

The new text direction

Nullable<char> replacementCharacter = null

The new replacement character

Returns

Style

A new style with the passed attributes changed