A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

35 lines
774 B

using System.Collections.Generic;
using Avalonia.Media.TextFormatting;
using Avalonia.Platform;
namespace Avalonia.UnitTests
{
public class MockGlyphRun : IGlyphRunImpl
{
public MockGlyphRun(IReadOnlyList<GlyphInfo> glyphInfos)
{
var width = 0.0;
for (var i = 0; i < glyphInfos.Count; ++i)
{
width += glyphInfos[i].GlyphAdvance;
}
Size = new Size(width, 10);
}
public Size Size { get; }
public Point BaselineOrigin => new Point(0, 8);
public void Dispose()
{
}
public IReadOnlyList<float> GetIntersections(float lowerBound, float upperBound)
{
return null;
}
}
}