Browse Source

Merge pull request #7516 from MarchingCube/textlayout-annotations

TextLayout: Nullable annotations
pull/7527/head
Dariusz Komosiński 5 years ago
committed by GitHub
parent
commit
a9c25d8bbc
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/Avalonia.Visuals/Media/TextFormatting/TextLayout.cs

6
src/Avalonia.Visuals/Media/TextFormatting/TextLayout.cs

@ -35,10 +35,10 @@ namespace Avalonia.Media.TextFormatting
/// <param name="maxLines">The maximum number of text lines.</param> /// <param name="maxLines">The maximum number of text lines.</param>
/// <param name="textStyleOverrides">The text style overrides.</param> /// <param name="textStyleOverrides">The text style overrides.</param>
public TextLayout( public TextLayout(
string text, string? text,
Typeface typeface, Typeface typeface,
double fontSize, double fontSize,
IBrush foreground, IBrush? foreground,
TextAlignment textAlignment = TextAlignment.Left, TextAlignment textAlignment = TextAlignment.Left,
TextWrapping textWrapping = TextWrapping.NoWrap, TextWrapping textWrapping = TextWrapping.NoWrap,
TextTrimming textTrimming = TextTrimming.None, TextTrimming textTrimming = TextTrimming.None,
@ -478,7 +478,7 @@ namespace Avalonia.Media.TextFormatting
/// <param name="lineHeight">The height of each line of text.</param> /// <param name="lineHeight">The height of each line of text.</param>
/// <returns></returns> /// <returns></returns>
private static TextParagraphProperties CreateTextParagraphProperties(Typeface typeface, double fontSize, private static TextParagraphProperties CreateTextParagraphProperties(Typeface typeface, double fontSize,
IBrush foreground, TextAlignment textAlignment, TextWrapping textWrapping, IBrush? foreground, TextAlignment textAlignment, TextWrapping textWrapping,
TextDecorationCollection? textDecorations, FlowDirection flowDirection, double lineHeight) TextDecorationCollection? textDecorations, FlowDirection flowDirection, double lineHeight)
{ {
var textRunStyle = new GenericTextRunProperties(typeface, fontSize, textDecorations, foreground); var textRunStyle = new GenericTextRunProperties(typeface, fontSize, textDecorations, foreground);

Loading…
Cancel
Save