Browse Source

Merge pull request #1624 from AvaloniaUI/fixes/1613-d2d-span-immutable-brush

Convert brush to immutable brush in D2D backend.
pull/1626/head
danwalmsley 8 years ago
committed by GitHub
parent
commit
831fe4d2e8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/Windows/Avalonia.Direct2D1/Media/FormattedTextImpl.cs

2
src/Windows/Avalonia.Direct2D1/Media/FormattedTextImpl.cs

@ -101,7 +101,7 @@ namespace Avalonia.Direct2D1.Media
if (span.ForegroundBrush != null)
{
TextLayout.SetDrawingEffect(
new BrushWrapper(span.ForegroundBrush),
new BrushWrapper(span.ForegroundBrush.ToImmutable()),
new DWrite.TextRange(span.StartIndex, span.Length));
}
}

Loading…
Cancel
Save