Browse Source

SetForegroundBrush in skia uses the smallest Length first. fixes #658

pull/668/head
donandren 10 years ago
parent
commit
d3dd806228
  1. 5
      src/Skia/Avalonia.Skia/FormattedTextImpl.cs

5
src/Skia/Avalonia.Skia/FormattedTextImpl.cs

@ -449,7 +449,10 @@ namespace Avalonia.Skia
if (_foregroundBrushes.Any())
{
var cbi = _foregroundBrushes.FirstOrDefault(b => b.Key.Intersects(index, len));
var cbi = _foregroundBrushes
.Where(b => b.Key.Intersects(index, len))
.OrderBy(b => b.Key.Length)
.FirstOrDefault();
if (cbi.Value != null)
{

Loading…
Cancel
Save